Rev 511 | Rev 518 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 511 | Rev 512 | ||
---|---|---|---|
Line 88... | Line 88... | ||
88 | SELECTDLGITEMTEXT(dp,TITLEITEM,0,-1); |
88 | SELECTDLGITEMTEXT(dp,TITLEITEM,0,-1); |
89 | } |
89 | } |
90 | 90 | ||
91 | Boolean containsUnicodeInput(DIALOGREF dp, int item) { |
91 | Boolean containsUnicodeInput(DIALOGREF dp, int item) { |
92 | enum { MAXFIELD = 0x100 }; |
92 | enum { MAXFIELD = 0x100 }; |
93 | char s[MAXFIELD + 1]; |
93 | char sa[MAXFIELD + 1]; |
94 | wchar_t sw[MAXFIELD + 1]; |
94 | wchar_t sw[MAXFIELD + 1]; |
95 | size_t i; |
95 | size_t i; |
96 | 96 | ||
97 | GetDlgItemTextA(dp, item, s, MAXFIELD); |
97 | GetDlgItemTextA(dp, item, sa, MAXFIELD); |
98 | GetDlgItemTextW(dp, item, sw, MAXFIELD); |
98 | GetDlgItemTextW(dp, item, sw, MAXFIELD); |
99 | for (i = 0; i < strlen(s); i++) { |
99 | for (i = 0; i < strlen(sa); i++) { |
100 | if (((wchar_t)s[i] != sw[i]) && (s[i] == '?')) { |
100 | if (((wchar_t)sa[i] != sw[i]) && (sa[i] == '?')) { |
101 | return true; |
101 | return true; |
102 | } |
102 | } |
103 | } |
103 | } |
104 | 104 | ||
105 | return false; |
105 | return false; |
Line 184... | Line 184... | ||
184 | } |
184 | } |
185 | } |
185 | } |
186 | 186 | ||
187 | #ifdef UNICODE |
187 | #ifdef UNICODE |
188 | if (unicode) { |
188 | if (unicode) { |
189 | // TODO: In this message, we recommend that the user chooses character of his own charset. |
189 | // "unicode" means that there are characters that will be converted to "?" when converting wchar_t* => char* |
190 | // BUT: The user should actually only choose A-Z, otherwise stuff might be displayed wrong on foreign computers?! |
190 | // Note that this is might be not true if your the characters are mapped in your current default Ansi Charset (e.g. German Umlauts on a German computer) |
191 | simplewarning_id(MSG_UNICODE_DATA_WARNING_ID); |
191 | simplewarning_id(MSG_UNICODE_DATA_WARNING_ID); |
192 | } |
192 | } |
193 | else |
193 | else |
194 | #endif |
194 | #endif |
195 | if (extCharset) { |
195 | if (extCharset) { |