Edit History Actions Discussion

Diff for "FAQ/Unicode"

Differences between revisions 4 and 5
Revision 4 as of 2006-08-01 18:05:03
Size: 758
Comment:
Revision 5 as of 2007-06-07 18:24:17
Size: 1216
Comment: Webpages
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
Yes. Yes. Both for commandline programs and for webpages.
Line 7: Line 7:
== Problem ==
Localized characters doesn't look good. (replaced by questionmarks etc)
=== Problem #1 - Commandline programs ===
Localized characters doesn't display correctly in irssi, nano etc (they are replaced with questionmarks, squares or something similar.)
Line 10: Line 10:
== Solution == '''Solution:'''
Line 26: Line 27:

=== Problem #2 - Webpages ===

Characers in webpages doesn't display correctly.

'''Solution:'''

Save the webpages in UTF-8 from your text-editor. Then create a new file named .htaccess in the same directory as your webpages (public_html) with the following content:

{{{
AddDefaultCharset UTF-8}}}
Line 27: Line 40:
["CategoryFAQ"]  ["CategoryFAQ"]

Question

Does the shell provide Unicode support?

Answer

Yes. Both for commandline programs and for webpages.

Problem #1 - Commandline programs

Localized characters doesn't display correctly in irssi, nano etc (they are replaced with questionmarks, squares or something similar.)

Solution:

Write this command at the shell prompt

echo 'export LC_ALL="en_US.UTF-8"' >> ~/.bashrc

Next time you log in your shell will be in unicode.

To use unicode in irssi, type this in the command prompt in irssi:

/set term_charset UTF-8

Use this command if you want to send text in another charset to other users that are still using ISO for example:

/set recode_out_default_charset iso-8859-1

Remember that you have to change the charset in your SSH-client aswell! Use the translation option in putty for example.

Problem #2 - Webpages

Characers in webpages doesn't display correctly.

Solution:

Save the webpages in UTF-8 from your text-editor. Then create a new file named .htaccess in the same directory as your webpages (public_html) with the following content:

AddDefaultCharset UTF-8


  • ["CategoryFAQ"]