How to get same result in C or C++ same as toLowerCase in Java or string.lower() in Python? -
i need c or c++ function(or library) works string.tolowercase()
in java.
i know can use tolower()
english, need function (or library) can cover global language. (actually, needs cover 9 languages listed below.)
language list
dutch english french german italian portuguese russian spanish ukrainian
add, these characters in first line below input , second line expected result
line 1:
aÁÀÂÄĂĀÃÅÆbcĆČÇdeÉÈÊËĚĘfghℏiÍÌÎÏjklŁmnŃŇÑoÓÒÔÖÕØŒpqrŘsŚŠŞtŢuÚÙÛÜŪvwxyÝzŹŽΑΔΕΘΛΜΝΠΡΣΣΦΩАБВГҐДЕЁЄЖЗИЙІЇКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ
line 2:
aáàâäăāãåæbcćčçdeéèêëěęfghℏiíìîïjklłmnńňñoóòôöõøœpqrřsśšştţuúùûüūvwxyýzźžαδεθλμνπρσςφωабвгґдеёєжзийіїклмнопрстуфхцчшщъыьэюя
i verified results java tolowercase()
, python string.lower()
, both correct.
is there way translate lowercase letter in c or c++?
and important thing letters read file encoded 'utf-8'!
please me. english not good, please use simple english as can.
i think find need in boost libraries - see http://www.boost.org/doc/libs/1_51_0/libs/locale/doc/html/conversions.html
quoting website:
boost.locale gives powerful tools development of cross platform localized software - software talks user in language.
provided features:
correct case conversion, case folding , normalization. collation (sorting), including support 4 unicode collation levels. ....
you idea, hope. function need is
boost::locale::to_lower(yourutf8string)
Comments
Post a Comment