<steveco.1...@gmail.com> writes: > As it is at the moment, I just use decode and I don't get any errors. > But I do need to use decode.
Whenever you bring data from outside Perl into Perl, you should decode it. If the data is ASCII (actually: Latin-1) it doesn't matter much, but if the data is encoded in anything else you *must* decode it into Perl's internal encoding (which happens to be Latin-1 or UTF-8, but that should not matter). When bringing data to the outside, it *must* be encoded to what the outside expects. When displaying data through Wx widgets, this encoding is handled for you. But when you write the data to a file you must encode it explicitly. Databases can be a problem, since it depends on the particular database whether you get the data already decoded or not. In general, modern databases should deliver and accept data in Perl's internal encoding. -- Johan