Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

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

Text transformation when using utf8.

I have a char* pointing to a utf8 encoded text. I want to be able to transform any character in that text to upper- or  lowercase.

toupper() and tolower() works on the ascii encoded characters of the text but I need to transform the characters that are stored using more than one byte as well.
0
tp5454
Asked:
tp5454
  • 2
1 Solution
 
jkrCommented:
>>toupper() and tolower() works on the ascii encoded characters

Use their wide-char equivalents: 'towupper()' and 'towlower()' instead.
0
 
cryptosidCommented:
jkr rules!!!
0
 
jkrCommented:
tp5454 - anything else you need to know?
0
 
jmcgOwnerCommented:
Nothing has happened on this question in more than 9 months. It's time for cleanup!

My recommendation, which I will post in the Cleanup topic area, is to
accept answer by jkr.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer
0

Featured Post

Independent Software Vendors: 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!

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