LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-21-2008, 07:03 AM   #1
navinkaus
LQ Newbie
 
Registered: Dec 2008
Posts: 14

Rep: Reputation: 0
Convert UTF-8 to wchar_t


I need to convert a string from UTF8 to wide character (wchar_t *). I
perform the same in windows using:

MultiByteToWideChar(CP_UTF8, 0, pInput, -1, , nLen);

What API can be used on linux or common API which will work on windows/linux ?

Thanks,
Navin
 
Old 12-21-2008, 07:51 AM   #2
jcookeman
Member
 
Registered: Jul 2003
Location: London, UK
Distribution: FreeBSD, OpenSuse, Ubuntu, RHEL
Posts: 417

Rep: Reputation: 33
This is what you are after:

http://www.gnu.org/software/libc/man...r-Set-Handling

In regards to cross platform API, there is a glibc port for Windows, but I don't know what state it is in. GTK would probably be a good library to look at for cross platform C development.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
convert text-file from utf-8 to iso-8859-1 [SOLVED] @ngelot Linux - Server 1 06-12-2007 05:47 AM
How to convert string to wchar_t krishnacins Programming 1 03-28-2006 04:21 AM
I need perlscript to convert text file in UTF-16 cccc Programming 3 07-04-2004 04:08 AM
convert CSV (TEXT) files to UTF-16 cccc Programming 1 07-01-2004 01:54 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration