Re: [Rd] problem gsub in the locale of CP932 and SJIS (PR#9751)

2007-06-25 Thread nakama
Thanks. As for mbs_init, the outside of the loop is desirable. probrem code is. > gsub("A","=A5u30bd=A5u8868","A") euc-jp and utf-8 moves without a problem. > Sys.getlocale("LC_CTYPE")# SHIFT_JIS system. [1] "ja_JP.SJIS" > charToRaw("=A5u30bd=A5u8868") # The second byte is a char of 5c [1

Re: [Rd] problem gsub in the locale of CP932 and SJIS (PR#9751)

2007-06-25 Thread ripley
Thanks for this. I don't think the patch is quite right. As I understand it, mbstate_t should be initialized at the start of the string, not before each character, and that is what is done in the rest of R. Also, do you have an example I can use to test the patch, please? R 2.5.0 is now in co