LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-21-2004, 04:33 AM   #1
synna
Member
 
Registered: Jan 2004
Posts: 40

Rep: Reputation: 15
How to know encoding used for filename


Hi,

For a project I need to know wich encoding (ISO-Latin1 or UTF-8...) is used for path and filename. Is this always the same ?
can I assume something ?

I use iconv to convert encoding (actually all the app is in UTF-8) and I can't use a library for this.

Thanks for your response.
 
Old 12-22-2004, 09:57 AM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Well, you can check if there are UTF-8 characters in the path. And that's the only way. But... it'll fail if other encoding is used.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
change uploaded files from filename.avi to filename.avi.html like www.rapidshare.de latheesan Linux - Newbie 3 06-16-2005 04:33 AM
filename~ djc SUSE / openSUSE 2 02-14-2005 01:52 PM
@ in filename Hamsjael Linux - Software 4 01-27-2005 01:05 PM
filename- and filename~ files? slinky2004 Linux - Newbie 5 10-17-2004 10:32 PM
\ in filename cblamer Slackware 6 12-20-2003 02:40 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration