jh5774....@samsung.com wrote:
Well, I found a little clue about encoding.
/usr/lib/python2.6/json/__init__.py
in this codes, they said python only decode 'ASCII' and 'Unicode'.
So, python couldn't decode when encounter like a 'Korean word'
I find some solution about decoding.
For example,
a= '테스트'
unicodeA =a.decode('euc-kr')
utf8A = unicodeA.encode('utf-8')
or
u = unicode(a, 'euc-kr').encode('utf-8')
Now, I must find the where reviewboard receive response message
which their request to perforce using 'p4 describe' command.
Anyone who knows about that, please tell me.
I'd be tempted to take a look at postreview and look at adding an
encoding flag. I haven't yet really looked at the transport mechanism,
there is a string implication that Unicode (specifically utf8) is sent
for the diffs, really bytes should be sent. This may be because json is
supposed to be utf8. Basically you would do the first part of your
example above in postreview. The other option (and this is a hack) is to
change your site packages to change the default system encoding for
Python from ASCII (default for windows) to euc-kr. This normally isn't
recommended BUT it would be a good diagnostic step to take to
prove/disprove the theory. See
http://blog.ianbicking.org/illusive-setdefaultencoding.html
Let us know how you get on.
The extreme solution would be to use utf8 encoding for all source code,
which is fine for new projects but more tricky for older projects.
--
Want to help the Review Board project? Donate today at
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/reviewboard?hl=en