non-ascii-characters

How do I get accented letters to actually work on bash?

≡放荡痞女 提交于 2019-12-03 06:38:04
问题 My bash installation on cygwin doesn't handle accented letters properly. I tried adding set input-meta on # to accept 8-bit characters set output-meta on # to show 8-bit characters set convert-meta on # to show it as character, not the octal representation to my input rc, but this doesn't quite work yet. Indeed, if I type $ echo ù then before i press enter it is automatically changed to $ echo \303 although the output is right, for I get $ echo \303 ù I get the same result for anyother

How do I get accented letters to actually work on bash?

房东的猫 提交于 2019-12-02 21:08:39
My bash installation on cygwin doesn't handle accented letters properly. I tried adding set input-meta on # to accept 8-bit characters set output-meta on # to show 8-bit characters set convert-meta on # to show it as character, not the octal representation to my input rc, but this doesn't quite work yet. Indeed, if I type $ echo ù then before i press enter it is automatically changed to $ echo \303 although the output is right, for I get $ echo \303 ù I get the same result for anyother accented letter. Usually though I use a non-italian keyboard, and I use autohotkey to substitute letters with

Dictionary corrupt the name of the key [Python]

回眸只為那壹抹淺笑 提交于 2019-12-02 16:33:27
问题 My problem is that when I get input with accent then the dictionary stores different keyname, it replace the accented character wit a character code. I'm new here I accept every help. Thank you for your help! #!/usr/bin/python # -*- coding: utf-8 -*- products={} try: prodNum = int(raw_input(u"Hány terméket kíván felvenni a listába?\r\n")) count = 0 while (count < prodNum): prodName = raw_input(u"Kérem üsse be a %d. termék nevét!\r\n" %(count + 1)) encodedName = prodName.decode('utf8') print

Dictionary corrupt the name of the key [Python]

依然范特西╮ 提交于 2019-12-02 12:49:32
My problem is that when I get input with accent then the dictionary stores different keyname, it replace the accented character wit a character code. I'm new here I accept every help. Thank you for your help! #!/usr/bin/python # -*- coding: utf-8 -*- products={} try: prodNum = int(raw_input(u"Hány terméket kíván felvenni a listába?\r\n")) count = 0 while (count < prodNum): prodName = raw_input(u"Kérem üsse be a %d. termék nevét!\r\n" %(count + 1)) encodedName = prodName.decode('utf8') print(encodedName) prodVal = int(raw_input(u"Kérem üsse be a %d. termék darabszámát!\r\n" %(count + 1)))

Batch creation of a list of folders : can't echo accented characters

只谈情不闲聊 提交于 2019-12-02 01:47:33
问题 I use this batch instruction to generate a list of every subdirectory NOT containing a .zip file : @echo off for /d /r %%f in (*) do ( if not exist %%f\*.zip ( echo %%f >>G:\backup\folders.txt ) ) The problem is this generates a list in which accents break the returned results, for instance G:\backup\! d‚j… upload‚\ instead of G:\backup\! déjà uploadé‚\ I read that batch can only deal with Unicode characters by default. There are tricks to make it eat paths with an accent, but I found NO

Outputting dates in non-ASCII characters with PHP

怎甘沉沦 提交于 2019-12-02 01:46:15
问题 I'm trying to output the date in Traditional Chinese. I have the date as a Unix timestamp, ( example: "1467244800" ). I am doing the following: <?php setlocale (LC_TIME, "zh_TW"); echo strftime("%e %B %Y", $timestamp ); ?> What I'm getting output is the Unicode "Undefined" characters: 30 ���� 2016 17 �T�� 2016 18 �Q�G�� 2015 Can anyone tell me what I'm doing wrong? My HTML headers contain: <html lang="zh-TW"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> And the rest of

Outputting dates in non-ASCII characters with PHP

前提是你 提交于 2019-12-02 01:39:29
I'm trying to output the date in Traditional Chinese. I have the date as a Unix timestamp, ( example: "1467244800" ). I am doing the following: <?php setlocale (LC_TIME, "zh_TW"); echo strftime("%e %B %Y", $timestamp ); ?> What I'm getting output is the Unicode "Undefined" characters: 30 ���� 2016 17 �T�� 2016 18 �Q�G�� 2015 Can anyone tell me what I'm doing wrong? My HTML headers contain: <html lang="zh-TW"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> And the rest of my Chinese content on the page is outputting fine. If you view the page source you see: <span>最新消息<

pandas.read_csv can't import file with accent mark in path

和自甴很熟 提交于 2019-12-01 22:34:37
I am developing an application with Python and a QT GUI. I need to import a file to a DataFrame . I use a QFileDialog.getOpenFileName to get the path and filename to open it with pandas.read_csv method. Everything works well until I get a path with special characters like "ó". The pandas.read_csv doesn't work and crash the app. I try to reproduce the error in console and have the following results: In[2]: import pandas as pd Backend Qt5Agg is interactive backend. Turning interactive mode on. In[3]: path1 = 'F:/Software_Proyects/Python/Proyectos/test_read_csv/FlowData.txt' In[4]: df1 = pd.read

Why non-ascii chars are displayed as weird symbols?

白昼怎懂夜的黑 提交于 2019-12-01 21:01:03
I have 2 cases here: My Database contains lots of info which I want to fetch to the page, some of these info are name which contain non-ascii chars like Uwe Rülke - Old solution which works well: I fetch the data from DB and populate the page directly from a VB while loop. In this case all the chars are displaying correctly Uwe Rülke - New solution which doesn't work properly: The VB's While loop doesn't throw the data directly to the page, rather in a JS strings (to enhance performance by not calling DB each now and then). but when I use the info stored in the JS variables I got something

grep/regex can't find accented word

谁说胖子不能爱 提交于 2019-12-01 19:53:26
I'm trying mount a regex that get some words on a file where all letters of this word match with a word pattern. My problem is, the regex can't find accented words, but in my text file there are alot of accented words. My command line is: cat input/words.txt | grep '^[éra]\{1,4\}$' > output/words_era.txt cat input/words.txt | grep '^[carroça]\{1,7\}$' > output/words_carroca.txt And the content of file is: carroça éra éssa roça roco rato onça orça roca How can I fix it? If your file is encoded in ISO-8859-1 but your system locale is UTF-8, this will not work. Either convert the file to UTF-8 or