On Dec 9, 11:25 pm, Baurzhan Ismagulov <[EMAIL PROTECTED]> wrote: > Hello Anton, > > On Sat, Dec 09, 2006 at 08:49:25PM +0200, Anton Daneika wrote: > > I tried entering a Cyrillic text for the poll question attribute, while > > playing with example polls application. This resulted in a bunch of question > > marks on the view page, instead of the expected "Как дела?" poll question, > > which was in Cyrillic.In my experience, text can get broken on each and > > every step. > > First, I would try to see whether the browser sends it correctly using a > dumping HTTP proxy (netcat or a simple perl script). Then, check whether > it is written correctly to the database (e.g., issue a SELECT in mysql). > Then, see if it is displayed correctly. > > With kind regards, > -- > Baurzhan Ismagulovhttp://www.kz-easy.com/
*The netcat part*: Here's what I did: 1. opened an admin interface, went to http://localhost:8000/admin/polls/poll/add/ and filled it with some cyrillics. 2. ran shell command: $ nc -l -vv -p 8000 localhost > cyrillic_trouble 3. pushed "Save and continue editing" on the admin page. Thus I got browser's POST request in cyrillic_trouble file. The POST's question parameter taken from that file looks this way: question=%D0%9A%D0%B0%D0%B3+%D0%B4%D0%B8%D0%BB%D0%B0%2C+%D0%BA%D1%80%D0%BE%D1%81%D0%B0%D1%84%D1%87%D0%B5%D0%93%3F which is URL encoded text I did entered on the admin page. So is it supposed to be like this? I netcated the response to GET /admin/polls/poll/3/ HTTP/1.1 Host: localhost:8000 The troubled line (the one with question marks) looks like this: <input type="text" id="id_question" class="vTextField required" name="question" size="30" value="??? ?????" maxlength="200" /> *The MySQL part*: I did: <code> mysql> select * from polls_poll; +----+--------------------+---------------------+ | id | question | pub_date | +----+--------------------+---------------------+ | 1 | what's up? | 2006-12-05 15:05:00 | | 2 | how are you today? | 2006-12-03 15:22:00 | | 3 | ??? ????? | 2006-12-09 12:24:13 | +----+--------------------+---------------------+ </code> the third row was inserted via admin interface and as you can see it's just question marks. then I tried to ran the following SQL: mysql> insert into polls_poll (`question`, `pub_date`) values ('Ты используешь Джанго?', NOW()); now it's displayed ok in the mysql client, but the admin interface shows a different style garbled text instead: Ты иÑпользуешь Джанго? which is Ты используешь Джанго? I'm desperately stuck for now. Hope someone will push me towards. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---