Linux C - I have loaded a windows wchar_t string from a file how do I convert the string to UTF8 gchar ?

Linux C - I have loaded a windows wchar_t string from a file how do I convert the string to UTF8 gchar ?

Could someone provide a small example how I should do this ?

Thankyou experts.

/Blue
TremorBlueAsked:
Who is Participating?
 
evilrixSenior Software Engineer (Avast)Commented:
UTF8 encoding isn't simple. I would recommend you use the (pretty much standard) ICU library for performing all your Unicode conversion work.

http://site.icu-project.org/
http://userguide.icu-project.org/strings/utf-8
0
 
TremorBlueAuthor Commented:
I've requested that this question be deleted for the following reason:

I asked for an example the answer did not provide this.
0
 
evilrixSenior Software Engineer (Avast)Commented:
As already stated in my comment, UTF8 encoding is not a simple process -- hence I didn't provide any example and hence I pointed you to an open source (and pretty much the defacto) library that will do this for you. I even pointed you to the documentation regarding utf8 encoding, which does contain examples on how to use the library to perform encoding.

Given there was no feedback from you there was nothing else I could have done to assist. For this reason I am objecting. If you need further assistance I'll be happy to do so but otherwise there really is no valid reason to delete this question as a valid solution has been provided.
0
 
evilrixSenior Software Engineer (Avast)Commented:
I suggest http:#a35716448 grade B.
0
 
TremorBlueAuthor Commented:
Weblinks but no example
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.