perl-unicode

Re: Always setting UTF-8 flag - am I bad?

2004-08-05 15:30:06
Nick Ing-Simmons (nick(_at_)ing-simmons(_dot_)net) writes:
The possible danger here is if the "multi byte" encoding for 
user's environment is not UTF-8 but (say) a Japanese one.

No problem. WideCharToMultiByte has an argument where you tell what you
want to convert to, and I specifically say that I want UTF-8.

The alternative would be to first try with CP_ACP, that is the ANSI
code page. Which on my machine would be CP1252 and not Latin-1, which
you point out as a possible problem.

Thanks for the response! It appears that I have no reason to change.

(And I have also found out how to handle hash keys. Using hv_store and
send in a raw char* was not that bright of an idea. hv_store_ent with an
SV* key was a lot better.)


-- 
Erland Sommarskog, Stockholm, esquel(_at_)sommarskog(_dot_)se

<Prev in Thread] Current Thread [Next in Thread>