LinuxQuestions.org
Visit Jeremy's Blog.
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 05-18-2020, 11:39 AM   #16
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 9,605

Rep: Reputation: 4279Reputation: 4279Reputation: 4279Reputation: 4279Reputation: 4279Reputation: 4279Reputation: 4279Reputation: 4279Reputation: 4279Reputation: 4279Reputation: 4279

Quote:
Originally Posted by rnturn View Post
Code:
LC_ALL="" ./unicode_reader
it works fine.
Whoa good catch! I didn't think of that.
 
Old 05-19-2020, 02:57 PM   #17
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and x86_64
Posts: 2,036
Blog Entries: 20

Rep: Reputation: 138Reputation: 138
can your code read this file OK? http://ipal.net/unicode/unicode-utf8.out
 
Old 05-19-2020, 03:07 PM   #18
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and x86_64
Posts: 2,036
Blog Entries: 20

Rep: Reputation: 138Reputation: 138
i have LC_ALL=C and i'm able to read Unicode in the form of UTF-8 just fine. but i recall trouble with bytes that would encode UTF-16 surrogates, which are not supposed to be present.
 
Old 05-19-2020, 03:13 PM   #19
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and x86_64
Posts: 2,036
Blog Entries: 20

Rep: Reputation: 138Reputation: 138
i wouldn't necessary label Python3's Unicode as "perfect", but i would call it "completely correct". it's why i shifted from 2 to 3 as quick as i could. i even dissupported Python2 in my code back in 2017. a lot of my code got aggressive about it with hidden test and raise all over.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] making python3.6.4 default python3 Astral Axiom Linux - Newbie 17 04-14-2018 10:55 AM
[SOLVED] how to start python3.6 interpreter just by typing python in terminal not python3.6 bmohanraj91 Linux - Newbie 4 05-10-2017 07:51 AM
After upgrade python3.4 to python3.5.1 , not able to install packages "request" though pip3 YOGESHAS87 Linux - Software 1 08-03-2016 10:38 PM
[SOLVED] Problem displaying Unicode special characters in Urxvt/rxvt-unicode terminal shahinism Slackware 4 10-22-2012 03:08 PM

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

All times are GMT -5. The time now is 05:01 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration