DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 19th April 2009
MrWolf MrWolf is offline
New User
 
Join Date: Apr 2009
Posts: 7
Default FreeBSD and UTF-8 filename

Hi,

I read a lot of post on the net about using UTF-8 or ISO-8859-1 for filename but none of them provide a real solution. Sometimes, I download some file with french character but FreeBSD doesn't support it so it rename the file by changing all the french character with underscore (i.e: "école" become "_cole"). Is there anything I can do to make my FreeBSD support french character for filename?

I use FreeBSD 7.1-RELEASE-P4 AMD64 with GENERIC Kernel
Reply With Quote
  #2   (View Single Post)  
Old 19th April 2009
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

FreeBSDs file system has no concept of UTF-8 or any other encoding, it's just 8-bits of data as far as it is concerned.

Now other programs such as vi and xterm might not be ready to deal with it in the way you expect. What is your systems locale settings, and how are you checking these things?
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #3   (View Single Post)  
Old 20th April 2009
MrWolf MrWolf is offline
New User
 
Join Date: Apr 2009
Posts: 7
Default

Hi TerryP,

actually, my ttys is set at cons25
I probably should set it at cons25l1 (for ISO8859-1)

For the font, actually I don't have anything in my rc.conf but I should set something in this:
font8x16=font_name
font8x14=font_name
font8x8=font_name

and my locale:
LANG=
LC_CTYPE="C"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=

I read that I can set LC_... in the login script but it's a file server, most of the time there's no one logged in. so it's useless.

Sorry for my poor english as you can see it's not my first language
Reply With Quote
  #4   (View Single Post)  
Old 20th April 2009
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

If you are working off a cons25, you may want to read this page on the FreeBSD wiki.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #5   (View Single Post)  
Old 21st April 2009
MrWolf MrWolf is offline
New User
 
Join Date: Apr 2009
Posts: 7
Default

I tried cons25, cons25l1 and xterm in my ttys
both cons25 ans cons25l1 works the same. xterm make strange thing.
in my rc.conf I put:
font8x8="iso-8x8"
font8x14="iso-8x14"
font8x16="iso-8x16"
scrnmap="iso-8859-1_to_cp437"
keymap="fr_CA.iso.acc.kbd"

but I still can't type any french character
Reply With Quote
  #6   (View Single Post)  
Old 23rd April 2009
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

xterm is for 8-bit coding

use rxvt-unicode instead (probably in x11 dir)
make sure you export
LC_ALL=en_US.UTF-8
(you can export different locale, but it must be with UTF-8)
somewhere/somehow
otherwise it might now work pretty good
Also you may need to configure it (font related stuff)

(i export this from my .shrc, .xsession and .xinitrc, and have a good reason for that)

this is under X of course
(this way (even exporting en_US.UTF-8) i type Latvian/Russian/English in virtual terminal)

Last edited by graudeejs; 23rd April 2009 at 09:12 PM.
Reply With Quote
  #7   (View Single Post)  
Old 23rd April 2009
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

You'll find it in x11/rxvt-unicode but the binary is called urxvt.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #8   (View Single Post)  
Old 24th April 2009
MrWolf MrWolf is offline
New User
 
Join Date: Apr 2009
Posts: 7
Default

the problem is I don't use any gui interface. I only use console with bash
Reply With Quote
  #9   (View Single Post)  
Old 24th April 2009
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

console doesn't support UTF-8
Reply With Quote
Old 24th April 2009
MrWolf MrWolf is offline
New User
 
Join Date: Apr 2009
Posts: 7
Default

Is there any support for ISO-8859-1 or it's not supported either?
Reply With Quote
Old 24th April 2009
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

ISO-8859-1 is pretty much same as ASCII
It is supported
basically you don't even need to change anything
Reply With Quote
Old 26th April 2009
MrWolf MrWolf is offline
New User
 
Join Date: Apr 2009
Posts: 7
Default

but as i now ISO-8859-1 support french accent...

how can I enable it to gain french accent support in my console?
Reply With Quote
Old 27th April 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

Quote:
Originally Posted by MrWolf View Post
but as i now ISO-8859-1 support french accent...

how can I enable it to gain french accent support in my console?
The FreeBSD handbook has a chapter dedicated to internationalization.

http://www.freebsd.org/doc/fr/books/handbook/l10n.html
http://www.freebsd.org/doc/fr/books/...alization.html
Reply With Quote
Old 28th April 2009
hansivers hansivers is offline
Real Name: Hans Ivers
Port Guard
 
Join Date: Jun 2008
Location: Victoria, BC, Canada
Posts: 20
Default

Quote:
Originally Posted by MrWolf View Post
but as i now ISO-8859-1 support french accent...

how can I enable it to gain french accent support in my console?
Do you want to see french characters in console or do you want to type french characters in console?

I'm a french-speaker, from Quebec (Canada). I met a related problem a few weeks ago, when I installed samba for file sharing on a freebsd server. The only way I found to see french characters IN CONSOLE was to specify in smb.conf (global options) "unix charset = ISO8859-1".

That way, I see correctly french characters via a Windows share and via the standard freebsd text console.
Reply With Quote
Old 29th April 2009
MrWolf MrWolf is offline
New User
 
Join Date: Apr 2009
Posts: 7
Default

hansivers:

that's exacly what I want. Thank you
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:41 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick