Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
UTF8 キリル文字から UTF8 ラテン文字に変換する関数を作成するには? 文字テーブルを作成する必要があることはわかっていますが、主な問題は文字列を表現する方法です(C、Linux OSで)? char* または int* として (UTF8 のサイズによる)?
void convert(unsigned char* str) { if(str[0] == 'A' ) str[0] = 0xd090; // Cyrillic A ... }
chara に収まらないため、 aをint(またはshort) に置き換えることはできませんchar。ラテン文字をwchar_t配列に読み込むか、キリル文字用に別の出力配列を使用してください。
char
int
short
wchar_t