Connecting Tech Pros Worldwide Forums | Help | Site Map

Swedish Characters

Tim Mickelson
Guest
 
Posts: n/a
#1: Jul 20 '05
Hi I thought that working with swedish characters would be easy, but
since I'm working with MySQL 4.1 that's not the case any more.
First thing I noticed (emditly) was an application that I've written
in Qt showd rubbish in the QDataTable where there should be swedish
characters. So I took a look in the database using the 'mysql' client
app, but using this, all is good? So I made a 'mysqldump -u xx -pxx
dbname < cazzo.sql' and took a look in the .sql file, but again the
swedish characters were rubbish.
I've really tried a lot of thing to solve this. E.g. changing the
default-character-set to all kinds of values, creating new databases,
etc etc. But I just can't get it. What am I missing?


Any help would really be nice ... please

Tim Mickelson

Paul Bramscher
Guest
 
Posts: n/a
#2: Jul 20 '05

re: Swedish Characters


Tim Mickelson wrote:[color=blue]
> Hi I thought that working with swedish characters would be easy, but
> since I'm working with MySQL 4.1 that's not the case any more.
> First thing I noticed (emditly) was an application that I've written
> in Qt showd rubbish in the QDataTable where there should be swedish
> characters. So I took a look in the database using the 'mysql' client
> app, but using this, all is good? So I made a 'mysqldump -u xx -pxx
> dbname < cazzo.sql' and took a look in the .sql file, but again the
> swedish characters were rubbish.
> I've really tried a lot of thing to solve this. E.g. changing the
> default-character-set to all kinds of values, creating new databases,
> etc etc. But I just can't get it. What am I missing?
>
>
> Any help would really be nice ... please
>
> Tim Mickelson[/color]

Not sure it matters, but you have your arrow the wrong way. Try ">"
instead.
Tim Mickelson
Guest
 
Posts: n/a
#3: Jul 20 '05

re: Swedish Characters


no, that's not my problem :) just an error when writing the e-mail.




Paul Bramscher wrote:[color=blue]
> Tim Mickelson wrote:
>[color=green]
>> Hi I thought that working with swedish characters would be easy, but
>> since I'm working with MySQL 4.1 that's not the case any more.
>> First thing I noticed (emditly) was an application that I've written
>> in Qt showd rubbish in the QDataTable where there should be swedish
>> characters. So I took a look in the database using the 'mysql' client
>> app, but using this, all is good? So I made a 'mysqldump -u xx -pxx
>> dbname < cazzo.sql' and took a look in the .sql file, but again the
>> swedish characters were rubbish.
>> I've really tried a lot of thing to solve this. E.g. changing the
>> default-character-set to all kinds of values, creating new databases,
>> etc etc. But I just can't get it. What am I missing?
>>
>>
>> Any help would really be nice ... please
>>
>> Tim Mickelson[/color]
>
>
> Not sure it matters, but you have your arrow the wrong way. Try ">"
> instead.[/color]
Paul Bramscher
Guest
 
Posts: n/a
#4: Jul 20 '05

re: Swedish Characters


Here's another trick question for you. What are you using to look at
the file with? I'm not sure how mySQL dumps out the characters -- but
it's possible they are correct and your editor is not displaying them
properly?

Tim Mickelson wrote:[color=blue]
> no, that's not my problem :) just an error when writing the e-mail.
>
>
>
>
> Paul Bramscher wrote:
>[color=green]
>> Tim Mickelson wrote:
>>[color=darkred]
>>> Hi I thought that working with swedish characters would be easy,
>>> but since I'm working with MySQL 4.1 that's not the case any more.
>>> First thing I noticed (emditly) was an application that I've
>>> written in Qt showd rubbish in the QDataTable where there should be
>>> swedish characters. So I took a look in the database using the
>>> 'mysql' client app, but using this, all is good? So I made a
>>> 'mysqldump -u xx -pxx dbname < cazzo.sql' and took a look in the .sql
>>> file, but again the swedish characters were rubbish.
>>> I've really tried a lot of thing to solve this. E.g. changing the
>>> default-character-set to all kinds of values, creating new databases,
>>> etc etc. But I just can't get it. What am I missing?
>>>
>>>
>>> Any help would really be nice ... please
>>>
>>> Tim Mickelson[/color]
>>
>>
>>
>> Not sure it matters, but you have your arrow the wrong way. Try ">"
>> instead.[/color][/color]
Asterix
Guest
 
Posts: n/a
#5: Jul 20 '05

re: Swedish Characters


Paul Bramscher <brams006_nospam@tc.umn.edu> wrote:
[color=blue]
> Here's another trick question for you. What are you using to look at
> the file with? I'm not sure how mySQL dumps out the characters -- but
> it's possible they are correct and your editor is not displaying them
> properly?[/color]

That was my thought too. Output may very well be unicode (UTF-8).
Looks really ugly if you don't have the proper reader. Then you will
see each å, ä or ö as a set of two very odd non-ascii characters.
If that is the case, try to find an interface that supports unicode.

I am trying out a php based booking system for meeting rooms (mrbs) on
my Mac at work - first I had to turn off either unicode support or the
translation modules, since the build-in php module lacked the required
iconv support. Weekdays looked weird in Swedish browsers.

After a few weeks of testing I assembled some courage and installed
PHP5, then I re-enabled unicode support, and it looks fine now.

--
I recommend Macs to my friends, and Intel machines
to those whom I don't mind billing by the hour
Tim
Guest
 
Posts: n/a
#6: Jul 20 '05

re: Swedish Characters


Actually I thought about that to. I changed the character set in mysql
from utf8 to latin1 to.... Etc. And I'm using gvim for windows to look
with, it has latin1 as default character set. When changing from, say
latin1 to utf8 in my db, the output changes, but is always rubbish. If I
put åäö in the database from my application, written in Qt, in the database
I see strange characters, when looking in my datatable in the application,
all is ok, if I put the åäö from the 'mysql' client app, then all looks ok
from the query inside the 'mysql' but in the datatable, only rubbish.

I understand that there is a real big messup here with the character sets
from my side, but I'd like to understand what's happening. If I create a db
with CREATE DATABASE cazzo DEFAULT CHARACTER SET latin1, then all varchars
are latin1 or no? But why can I not see the swedish chars in my app, or in
a mysqldump? Neither if I use utf8. There is something I'm missing here.

Tim.

Asterix wrote:
[color=blue]
> Paul Bramscher <brams006_nospam@tc.umn.edu> wrote:
>[color=green]
>> Here's another trick question for you. What are you using to look at
>> the file with? I'm not sure how mySQL dumps out the characters -- but
>> it's possible they are correct and your editor is not displaying them
>> properly?[/color]
>
> That was my thought too. Output may very well be unicode (UTF-8).
> Looks really ugly if you don't have the proper reader. Then you will
> see each å, ä or ö as a set of two very odd non-ascii characters.
> If that is the case, try to find an interface that supports unicode.
>
> I am trying out a php based booking system for meeting rooms (mrbs) on
> my Mac at work - first I had to turn off either unicode support or the
> translation modules, since the build-in php module lacked the required
> iconv support. Weekdays looked weird in Swedish browsers.
>
> After a few weeks of testing I assembled some courage and installed
> PHP5, then I re-enabled unicode support, and it looks fine now.
>[/color]

Closed Thread