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

[email protected] (Erland Sommarskog)
Newsgroups perl.unicode
Organization Erland Sommarskog
Message-ID <[email protected]>
Nick Ing-Simmons ([email protected]) 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, [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.