[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 436
  • Last Modified:

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
0
TremorBlue
Asked:
TremorBlue
  • 3
  • 2
1 Solution
 
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

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now