.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   The RealBot 'Source' (http://forums.bots-united.com/forumdisplay.php?f=52)
-   -   minor change to the chatengine.cpp (http://forums.bots-united.com/showthread.php?t=2334)

Whistler 21-07-2004 02:52

minor change to the chatengine.cpp
 
Code:

// fill in the word:
// 03/07/04
// evy: specific translation for French/Spanish accute letters...
switch (sentence[c]) {
        case '\xE0': word[wc]='a' ; break ;
        case '\xE2': word[wc]='a' ; break ;
        case '\xE4': word[wc]='a' ; break ;
        case '\xE7': word[wc]='c' ; break ;
        case '\xE9': word[wc]='e' ; break ;
        case '\xEA': word[wc]='e' ; break ;
        case '\xE8': word[wc]='e' ; break ;
        case '\xEF': word[wc]='i' ; break ;
        case '\xF1': word[wc]='n' ; break ;
        case '\xF6': word[wc]='o' ; break ;
        case '\xF4': word[wc]='o' ; break ;
        case '\xF9': word[wc]='u' ; break ;
        case '\xFB': word[wc]='u' ; break ;
        case '\xFC': word[wc]='u' ; break ;
        default: word[wc] = sentence[c];

...to make it buildable under some localized versions of OS's, especially those which uses double-byte characters like Chinese, Japanese and Korean. Otherwise MSVC will complain.

Note: All the characters which is larger than 127 will be treated as double-byte characters under those localized OS's, along with the next byte.

stefanhendriks 23-07-2004 13:54

Re: minor change to the chatengine.cpp
 
MSVC compiles fine here with these changes? ;)

anyway, your sollution sounds more neat; thx for the contribution! :)


All times are GMT +2. The time now is 08:20.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.