Support for Unicode in GTK2 and GTK3 file selection box?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Support for Unicode in GTK2 and GTK3 file selection box?
# 8  
Old 12-12-2019
I must be really dense, LOL

According to the title, and from http://asciivalue.com/index.php that char you are referring to is ASCII char 151 according to asciivalue.com:

Code:
http://asciivalue.com/index.php

See also (Extended ASCII):

Code:
https://www.petefreitag.com/cheatsheets/ascii-codes/

Also, analyzed with an online ASCII checking tool (asciivalue.com), it indicated this is ASCII 151. BTW, it is also known as "em dash" as I recall, Extended ASCII 151.

Support for Unicode in GTK2 and GTK3 file selection box?-screen-shot-2019-12-12-115145-ampng

I must be really dense today (not enough sleep or coffee?) because I am not finding your posts and replies "understandable" That em dash in the HTML title string of DuckDuckGo is extended ASCII.

I (1) opened the DuckDuckGo HTML source, and (2) cut-and-pasted the title directly into the ASCII checker (asciivalue.com) and (3) the ASCII checker says ASCII 151.... Smilie then I(4) checked against a different online Extended ASCII table, and it was also 151.

Code:
Below: http://asciivalue.com/index.php

Support for Unicode in GTK2 and GTK3 file selection box?-screen-shot-2019-12-12-120012-pmpng

I think I'll go ride my motorcycle in the country side.... since I cannot seem to understand how an "em dash", Extended ASCII 151 is somehow "not standard".... Smilie Smilie
This User Gave Thanks to Neo For This Post:
# 9  
Old 12-12-2019
That dash definitely triggers the bug and I cannot print the duckduckgo.com homepage to PDF unless I delete the dash (replacing it with a hyphen works fine).

So I guess my problem is worse than I thought: Not just Unicode characters but even extended ASCII characters in filenames can trigger this bug.
# 10  
Old 12-12-2019
Yes, it seems you have some fundamental problems, but since you are mixing issues like "printing PDF files from the web with extended ASCII chars" and "GTK file names not working with other charsets", etc. it is hard for me to troubleshoot and be more helpful, especially without detailed knowledge of your OS, languages supported, your browsers, how your browser languages are configured and how your GTK app filters charsets.

You have a lot of "moving parts", some related to the browser and some related to apps.

I simply do not have enough detailed information to be more useful.

Sorry, not to be more helpful.
# 11  
Old 12-12-2019
I solved this with an environmental variable:

Code:
export G_FILENAME_ENCODING=UTF-8

Putting it in my ~/.profile makes it permanent.

I figured this out when I stumbled into section 81.2 here:
GtkFileChooser - Guile-Gtk

Moderator's Comments:
Mod Comment Neo Added G_FILENAME_ENCODING Reference (below):


Quote:
G_FILENAME_ENCODING.

This environment variable can be set to a comma-separated list of character set names. GLib assumes that filenames are encoded in the first character set from that list rather than in UTF-8. The special token "@locale" can be used to specify the character set for the current locale.

Last edited by DevuanFan; 12-13-2019 at 11:54 AM..
These 2 Users Gave Thanks to DevuanFan For This Post:
# 12  
Old 12-13-2019
Thanks for posting your solution.

In the future, others searching the net when they have this problem will be glad you did.

Good job!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. How to Post in the The UNIX and Linux Forums

Copying , renaming the file from windox box and ftp to Linux box

Hello my dear friends, Two file are auto generated from mon - fri at different directories on same windows box.Every day i have to copy the file, rename it (specific name)and ftp it to linux box specified directory. is it possible to automate this process,If yes this has to be done from windows... (1 Reply)
Discussion started by: umesh yadav
1 Replies

2. Shell Programming and Scripting

Reading/Viewing an Unicode file

WE have a file coming from a server that has characters for 4-5 languages. If I download the file to my windows PC and open in Notepad ++, I can clearly see the text in different languages. Notepad++ is able to reder text that is in Portugese, French, Thai etc. My objective it to do the following:... (2 Replies)
Discussion started by: vskr72
2 Replies

3. Shell Programming and Scripting

Unicode file validation

I don't want HTML_CONTENT,RICH_CONTENT,TEXT_CONTENT columns data in the file and reset of data we need to extract. Find the attached file. Need to extract date in between DI_UX_ROW_END tag. Can help me using unix command using AWK. Thanks, (2 Replies)
Discussion started by: bmk
2 Replies

4. Programming

perl/Gtk2: issue with initializing Gtk2

hi everybody, currently i'm playing with perl and Gtk2. i've found a fairly old but nice looking example of a client/server application which is written in perl and Gtk2. the server part works perfect but i can't start the client part and keep getting following error message: $ ./client-gui.pl... (1 Reply)
Discussion started by: pseudocoder
1 Replies

5. UNIX for Advanced & Expert Users

mail with Unicode support

Hello, I have a question. There is a command line mail client "mail", it is good, but obviously, does not support Unicode. Are there any (other) mail clients for command line having support for Unicode (UTF-8) and maybe other encodings? Or are there any other versions of mail/mailx programm which... (0 Replies)
Discussion started by: Action
0 Replies

6. Shell Programming and Scripting

ftp file starting with particular name on Windows box to Unix box using shell script

Hello all ! I'm trying to write a shell script (bash) to ftp a file starting with particular name like "Latest_" that is present on a Windows box to UNIX server. Basically I want to set this script in the cron so that daily the new build that is posted on the Windows box can be downloaded to the... (2 Replies)
Discussion started by: vijayb4u83
2 Replies

7. UNIX for Advanced & Expert Users

Unicode Support in BIND?

Here at the agency I work for, a need has arisen for a subdomain that utilizes some unicode characters. It has something to do with our foreign clients getting "page could not be displayed" errors in their internationalized browsers. I am still investigating the issue, but I've been asked to find... (2 Replies)
Discussion started by: deckard
2 Replies

8. Shell Programming and Scripting

Run expect script in systems that don't support it out of box

Noob question .. My Java based application needs to change some user passwords based on some user actions. Since this application can run on Redhat AS2.1 / AS4.0 / Solaris 9 etc, the most safe and portable solution that I could think of was: Use expect. Now, expect is not available on all... (1 Reply)
Discussion started by: namityadav
1 Replies

9. UNIX for Advanced & Expert Users

How to FTP a file generated at UNIX Box to NT Box

Hi all, I am generating a file on the Unix machine , now i want to FTP the same file to the NT machine. how can i do that and the application currently upon which i am working is a JAVA based application. I need your help. regards Ruchir (2 Replies)
Discussion started by: Ruchir
2 Replies

10. Programming

How to display unicode characters / unicode string

I have a stream of characters like "\u8BBE\u5907\u7BA1" and i want to display it. I tried following things already without any luck. 1) printf("%s",L("\u8BBE\u5907\u7BA1")); 2) printf("%lc",0x8BBE); 3) setlocale followed by fwide followed by wprintf 4) also changed the local manually... (3 Replies)
Discussion started by: jackdorso
3 Replies
Login or Register to Ask a Question