So you just need to do one of the following (not both): (1) use iso-8859-7 as the text data for your html content (not utf8), and expect client browsers to use that encoding when diplaying the page; or (2) convert the file name strings to utf8 before you load them into the popup menu. Either way, the point is to make sure all the page content (text and form data) use the same encoding, and either way, Encode is the easiest to use. Here's how to convert the file names strings to utf8:
In other words, just add the "decode" call to your map block; it returns the utf8 version of the 8859-7 string stored in its second arg. I don't think anything else needs to change in your code (unless you have other 8859 strings coming from other places that you haven't shown us).use Encode; ## add this line near the top my @files = <../data/text/*.txt>; my @display_files = map { /([^\/]+)\.txt/; decode('iso-8859-7', $1) } +@files;
In reply to Re: Encoding problems
by graff
in thread Encoding problems
by Nik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |