in reply to Re: Encodings problem
in thread Encodings problem

But i dont useXML numeric entitiesnowhere. Thsi just happens when i copy/paste from the script to show you here. ps. I need the use rto select a filename but many try backware directory traversal trichsk. How do i properly insure that what will i get form the user will be only a filename with an dnot a string that contains dots and backslashes? ps2: are you sure that windows is able to save the filanems in pure utf8? if yes my files arent showed up normally but insated i ahve t use the encode function? Iam very confused about this.

Replies are listed 'Best First'.
Re^3: Encodings problem
by Joost (Canon) on Oct 07, 2006 at 22:39 UTC
    Well, how about you make a small, selfcontained program that demonstrates your problem (i.e. reading/writing files with UTF8 filenames - it shouldn't take more than 5 - 10 lines - and I do not mean a CGI program that needs lots of other files - just a simple command line program is much better) and if that still shows the problem, post it here along with a clear description of the problem involving at least the full program, the expected output and the actual output. you should know the deal by now.

    Also, I realize you're greek and english isn't your native language, but PLEASE try to spell at least the simple words like "this", "to" and "don't" correctly. A spelling error here or there isn't a problem but this is just very annoying to read.

    Now, one important tip: almost all the time you do not want to use Encode::from_to. You'll want to use Encode::encode (from utf8 to some other encoding) and Encode::decode (from some encoding to utf8). see the docs.