C++入門/Unicodeに対応する
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
''[[FrontPage]]''
*この記事はまだ書きかけです。管理人が今後加筆していく予...
* アプリケーションをUnicodeに対応させる [#r2296e76]
ワイド文字列を扱う場合に注意しなければならないこと。~
よくやるのは
#ifdef UNICODE ...
typedef wregex tregex; ...
typedef wstring tstring; ...
typedef wsmatch tsmatch; ...
typedef wstringstream tstringstream; ...
//typedef wprintf tprintf; ...
#else ...
typedef regex tregex; ...
typedef string tstring; ...
typedef smatch tsmatch; ...
typedef stringstream tstringstream; ...
//typedef wprintf tprintf; ...
#endif ...
のように、あくまでどっちつかずな方法。~
TCHARの概念をすべてに適用するというわけだけど、神経質すぎ?
*** 参考ページ [#ce23eda2]
http://www.246.ne.jp/~y-ookubo/program/tips/unicode.html~
http://www.usefullcode.net/2006/11/tcharlpctstrlptstr.html~
http://hw001.gate01.com/eggplant/tcf/cpp/wchar_t_trap.html~
http://hp.vector.co.jp/authors/VA019646/software/func_lis...
終了行:
''[[FrontPage]]''
*この記事はまだ書きかけです。管理人が今後加筆していく予...
* アプリケーションをUnicodeに対応させる [#r2296e76]
ワイド文字列を扱う場合に注意しなければならないこと。~
よくやるのは
#ifdef UNICODE ...
typedef wregex tregex; ...
typedef wstring tstring; ...
typedef wsmatch tsmatch; ...
typedef wstringstream tstringstream; ...
//typedef wprintf tprintf; ...
#else ...
typedef regex tregex; ...
typedef string tstring; ...
typedef smatch tsmatch; ...
typedef stringstream tstringstream; ...
//typedef wprintf tprintf; ...
#endif ...
のように、あくまでどっちつかずな方法。~
TCHARの概念をすべてに適用するというわけだけど、神経質すぎ?
*** 参考ページ [#ce23eda2]
http://www.246.ne.jp/~y-ookubo/program/tips/unicode.html~
http://www.usefullcode.net/2006/11/tcharlpctstrlptstr.html~
http://hw001.gate01.com/eggplant/tcf/cpp/wchar_t_trap.html~
http://hp.vector.co.jp/authors/VA019646/software/func_lis...
ページ名: