How do I stop double encoding or the treating of data as binary
storage?

What I tried  was:
changed the encoding of the of the controller and layouts to see if i
am double encoding.
But got the same display as in my previous port.

 the output from mysql in my database

SHOW COLLATION LIKE 'utf8%';
+--------------------+---------+-----+---------+----------+---------+
| Collation          | Charset | Id  | Default | Compiled | Sortlen |
+--------------------+---------+-----+---------+----------+---------+
| utf8_general_ci    | utf8    |  33 | Yes     | Yes      |       1 |
| utf8_bin           | utf8    |  83 |         | Yes      |       1 |
| utf8_unicode_ci    | utf8    | 192 |         | Yes      |       8 |
| utf8_icelandic_ci  | utf8    | 193 |         | Yes      |       8 |
| utf8_latvian_ci    | utf8    | 194 |         | Yes      |       8 |
| utf8_romanian_ci   | utf8    | 195 |         | Yes      |       8 |
| utf8_slovenian_ci  | utf8    | 196 |         | Yes      |       8 |
| utf8_polish_ci     | utf8    | 197 |         | Yes      |       8 |
| utf8_estonian_ci   | utf8    | 198 |         | Yes      |       8 |
| utf8_spanish_ci    | utf8    | 199 |         | Yes      |       8 |
| utf8_swedish_ci    | utf8    | 200 |         | Yes      |       8 |
| utf8_turkish_ci    | utf8    | 201 |         | Yes      |       8 |
| utf8_czech_ci      | utf8    | 202 |         | Yes      |       8 |
| utf8_danish_ci     | utf8    | 203 |         | Yes      |       8 |
| utf8_lithuanian_ci | utf8    | 204 |         | Yes      |       8 |
| utf8_slovak_ci     | utf8    | 205 |         | Yes      |       8 |
| utf8_spanish2_ci   | utf8    | 206 |         | Yes      |       8 |
| utf8_roman_ci      | utf8    | 207 |         | Yes      |       8 |
| utf8_persian_ci    | utf8    | 208 |         | Yes      |       8 |
| utf8_esperanto_ci  | utf8    | 209 |         | Yes      |       8 |
| utf8_hungarian_ci  | utf8    | 210 |         | Yes      |       8 |



On Jul 13, 10:29 am, AchipA <attila.cs...@gmail.com> wrote:
> Doublecheck that you actually have properly encoded data in the
> database ('show table X' should tell you the encoding of the table
> itself). Often 'displaying correctly' is misleading because of the
> possibility of making the same encoding mistake both ways (=treat
> mysql as binary storage). The other common problem is that you might
> be double-encoding (see the length of utf-8 chars -> if they are 4 or
> more, you're encoding already encoded data).
>
> On Jul 12, 9:49 pm, max <dulip.withan...@gmail.com> wrote:
>
> > I am implementing a search application using web2py.
> > I get the data from a  mysql data base where the data is inserted in
> > utf-8.
> > But when i access the data using web2py  connection data is not
> > displayed correctly.
> > I am sure, the mysql data is correctly encoded as other applications
> > accessing the same data show them correctly.
> > Some hints in this usergroup such as
> > #!/usr/bin/env python
> > # -*- coding: UTF-8 -*
> > in the default.py didn't help me.
> > max
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to