From kde-core-devel Wed May 31 21:20:26 2000 From: Waldo Bastian Date: Wed, 31 May 2000 21:20:26 +0000 To: kde-core-devel Subject: Re: locale stuff for smb [was Re: IMPORTANT REMINDER: no more binary incompatible changes after tomo X-MARC-Message: https://marc.info/?l=kde-core-devel&m=95980802516432 On Wed, 31 May 2000, Nicolas Brodu wrote: > Waldo Bastian wrote: > > On Wed, 31 May 2000, Nicolas Brodu wrote: > > > My question is, when you say 'no sanity check', does it include not > > > checking for it to be in decoded form? > > > > DECODED URLS DO NOT EXIST! *sigh* > > Sorry. I understand your concern after the last few threads on this > subject. However the SMB packets do include a field for the name of > workgroup, host, share, and those need to be in ASCIIZ with some > restrictions. The filename is another problem, but must match exactly. So, > opening, > smb:/myhost/myshare/my%20file won't work if your intent was to put a space > in the name. But a file named 'éóÂ ù' with accented characters and a space > will be opened OK if I send a request with this name in this form exactly. > > I admit I don't understand fully how this locale stuff works, and > unicode=>ascii translation. Is it a problem of specifying the > code/page/locale/whatever to decode into? All I know is that it must end up > with the ASCIIZ charset used by windows at the end, and I have a > contributed routine that can transform iso8859_1 to it (when using samba > code, there is also such a conversion routine for other than iso8859_1). I > never had the occasion to use, nor had any comment/bug report on, something > else than iso8859_1, so didn't worry about it... maybe the users of such > systems could try it out and tell what's going on. > > This won't introduce binary incompatibility for kio_smb as it's purely > internal, but I'd appreciate a clue as to how to proceed. KURL::path() is unicode without any %20 stuff. KURL::path().latin1() gives you the path in iso8859 encoding. You can convert from unicode to any other encoding you might want. (Maybe even directly to the desired windows encoding, no idea) Cheers, Waldo