(unexpected) problem with accented chars
jupp_g
jup... at hotmail.de
Fri Jan 11 11:09:20 UTC 2008
mea culpa. I changed alphtype to unsigned char but did not update p
and pe. I have not looked at the generated code in detail, but I guess
the problem was related to a spurious sign extension. Of course that
leaves the question why the "all" machine worked.
...
# now working:
main := ( ( (what_i_want)+ > start_line $ add_char % end_line ) ) 0 @
finish_line;
# only almost what I want, but works:
#main := ( ( (all)+ > start_line $ add_char % end_line ) ) 0 @
finish_line;
}%%
%% write data;
int main( int argc, unsigned char* argv[] )
{
#ifdef _WIN32
SetConsoleCP( 1252 );
SetConsoleOutputCP( 1252 );
#endif
for ( int i = 1; i < argc; ++i ) {
int cs;
unsigned char *p = argv[i];
unsigned char *pe = p + strlen( reinterpret_cast<char *>( p ) ) + 1;
More information about the ragel-users
mailing list