Calendar

<<February>>
MoTuWeThFrSaSu
  12345
6789101112
13141516171819
20212223242526
272829    

irssi and character encoding

Tue, 01 Sep 2009 01:30 - Daniel - Other - Comments (0)


I just spend way to much time trying to get irssi to join a channel with an umlaut in it's name. After trying about every combination of /recode ans /set recode* settings I could think about, checking if the encoding of every system and terminal emulator is correct and set to utf-8 and trying to start screen w/ and w/o -U I finally find something working

Setting the charset of gnome-terminal to iso-8859-1 produces horrible, unreadable Mojibake, but I can finally join the channel. After adding the channel to the autoconnect list I can join this channel w/o needing to switch the charset of gnome-terminal.

The channel name still looks messed up, but sending and receving special characters works, so I guess I can call it a success.

Charset problems just suck.


Tags: character set charset irssi irc



Importing mysql dumps from phpMyAdmin

Mon, 30 Mar 2009 16:12 - Daniel - Other - Comments (0)


Every time I move a website from a shared hosting account to my own server I have to export the databases with phpMyAdmin. But since these dumps can get pretty big, it's not a good idea to import then with phpMyAdmin. Usually you use the command line mysql client. But here comes the problem: Database dumps from phpMyAdmin are usually UTF8, but mysql expects ISO-8859-1 or something else and special chars like ä or ü end up as weird signs.

I've done some crazy shit before to fis this, like manually replacing those occurences, or converting the dump with iconv. I guess I should have read the man page more carefully, because mysql has an option to tell it which charset your file is in: default_character_set

Use mysql --default-character-set utf8 < dump.sql to im import your dump and everything works fine.


Tags: mysql charset character set phpmyadmin



1