Solved

UTF-8 and wstring

Posted on 2014-12-02
4
188 Views
Last Modified: 2014-12-02
I've been thinking that UTF-8 is best represented in a wstring, but I've just come across a library that has turned my world upside down.  They use char* for UTF-8.  Apparently this is the way it's supposed to be?  If my existing libraries all use wstring for UTF-8, what are your recommendations for me?

Thanks!
Mike
0
Comment
Question by:thready
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 1

Author Comment

by:thready
ID: 40477760
ok wow.. jkr  has not answered my question yet.  It must be that I'm not the only one that finds this confusing...!  :)
0
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 40477763
Be careful what you are wishing for - UTF-8 (http://en.wikipedia.org/wiki/UTF-8) - as the name implies it *tries* to encode UNICODE to a 8-bit contained space, but that requires code points (http://en.wikipedia.org/wiki/Code_point) which are IMO basically a different expression for 'code pages'. So, in a nutshell: If you *need* UNICODE, there is no way around using UNICODE or at least UTF-16, then you *might* be sure that the character mappings will be somehow universal. If you can live with a subset of that (and UTF-8 does not even pretend to be anything else), it will be fine.
0
 
LVL 86

Assisted Solution

by:jkr
jkr earned 500 total points
ID: 40477768
*LOL*
0
 
LVL 1

Author Closing Comment

by:thready
ID: 40477776
Thanks jkr  :-)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Recommendation vb6 to vb.net or others 14 205
c++, dynamic object by json 1 60
SSRS Deployment problem 5 93
Graph API & MS Apps 1 54
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question