Questions tagged [character]

1

votes
2

answer
291

Views

Python default/implicit string encodings

When, where and how does Python implicitly apply encodings to strings or does implicit transcodings (conversions)? And what those 'default' (i.e. implied) encodings are? For example, what are the encodings: of string literals? s = 'Byte string with national characters' us = u'Unicode string with nat...
ivan_pozdeev
1

votes
1

answer
176

Views

write unicode data to mssql with python?

I'm trying to write a table from a .csv file with Hebrew text in it to an sql server database. the table is valid and pandas reads the data correct (even displays the hebrew properly in pycharm), but when i try to write it to a table in the database i get question marks ('???') where the Hebrew shou...
Dror Bogin
1

votes
1

answer
39

Views

Why two file with same text and encoding but have different size?

I run a program with two 'same' test files separately but got two different results. First test file a.txt of 16 bytes leads to a right result, but second test file b.txt of 14 bytes causes the wrong result. I saved both of them in encoding UTF-8. Both of them consist of the following three lines w...
sirius
1

votes
2

answer
474

Views

IBM Extended ASCII Characters in HTML

I'm trying to get special characters into HTML, and am not sure if this is even possible. If anyone remembers Kroz, or just about every DOS interface - there is a special set of shape characters. I'm wanting to use the single braces, double braces, shadows, and other shape characters, but I can't se...
Aaron
1

votes
1

answer
49

Views

How is UTF-8 safe relative to ASCII chars

I was reading on Wikipedia, and came across the following: 'Since ASCII bytes do not occur when encoding non-ASCII code points into UTF-8, UTF-8 is safe to use within most programming and document languages that interpret certain ASCII characters in a special way, such as '/' in filenames, '\' in...
Learnerer
1

votes
1

answer
129

Views

Julia : How to convert vector of type string to type numeric (Float64)

In Julia 1.1 I want to convert a vector of type string to type numeric (Float64) here is the vector: string = ['2.2', '3,3', '4.4']; I tried the following line without success: x = convert(Float64, string) x = convert(DataVector{Float64}, string) x = map(x->parse(Float64,x),string) x = parse(Float...
ecjb
1

votes
1

answer
22

Views

Replacing an element in a character string by the previous value

I have a character string looking like this: string
WillyWonka
1

votes
2

answer
53

Views

In C, how do I print out a character array then empty it after?

I am trying to read a file line per line and check if there are any labels, which are written in the form of 'label:'. It checks the existence of the semicolon and pretty much just appends the characters before the semicolon into a character array temp. Then, empties temp and using fgets function to...
Tina
1

votes
2

answer
63

Views

Convert utf-8 unicode sequence to utf-8 chars in Python 3

I'm reading data from an aws s3 bucket which happens to have unicode chars escaped with double backslashes. The double backslashes makes the unicode sequence parsed as a series of utf-8 characters instead of the character which the unicode represents. The example illustrates the situation. >>> s1='1...
Leonard Saers
1

votes
2

answer
52

Views

Cleaning Text with python and re

I need to clean some text like the code below says: import re def clean_text(text): text = text.lower() #foction de replacement text = re.sub(r'i'm','i am',text) text = re.sub(r'she's','she is',text) text = re.sub(r'can't','cannot',text) text = re.sub(r'[-()\'#/@;:{}-=~|.?,]','',text) return text cl...
olfa masmoudi
1

votes
2

answer
37

Views

Can't print € symbol in console.log?

I'm pretty sure this is a very silly question but... I'm trying to output the Euro simbol (€) using console.log but I keep getting the following output: € I'm using UTF-8 for the encoding of my HTML file and the following is my whole html: console.log('€'); Funny thing is, when I rename t...
Alvaro
1

votes
3

answer
3.9k

Views

How do I convert C/C++ string with escape character to a plain (raw) string

The function prototype would be: string f (string s); or char* f (char* s); f would transform a string represented by printable ascii char into a raw string. and it would behaves as in the following examples: f('AAA') = 'AAA' f('AA\n') = 'AA+line_feed' i.e the input string is 4 char long (+ NULL), t...
Christophe Milard
1

votes
2

answer
8.6k

Views

How to Decode Scrambled Character Encoding: Special Character Encoding

I have data in CSV format that has been seriously scrambled character encoding wise, likely going back and forth between different software applications (LibreOffice Calc, Microsoft, Excel, Google Refine, custom PHP/MySQL software; on Windows XP, Windows 7 and GNU/Linux machines from various regions...
balleyne
1

votes
3

answer
1.4k

Views

Mysql bulgarian languages, character set

I have a Mysql table with multiple languages, one language a field. My character set is utf_general_ci When I look into the table with phpMyAdmin I have a bulgarian page which looks like this: За Ð½Ð°Ñ This is a title. This same title shows up in the website like this: За нас (this...
Klaaz
1

votes
0

answer
77

Views

What charset and encoding does Microsoft Excel use in CHAR() function

Background I am using Microsoft Excel 2010 on Windows 7 environment. System locale is Japanese. I want to convert a character codepoint to a character with CHAR() function. Problem =CHAR(HEX2DEC('244E')) returns a character の. 244E is the codepoint for の in JIS X 0208, so I had guessed that Exce...
satob
1

votes
0

answer
46

Views

rijndael aes turkish character not displayed (classic asp)

Response.LCID = 1055 Response.Codepage = 65001 Response.Charset = 'utf-8' knm = 'ışöçü' sss = 'asd' enc = AESEncyptString(knm,sss) dec = AESDecyptString(enc,sss) response.write(dec) Results = ????? I tried it with Base64. knm = Base64encode('ışöçü') sss = 'asd' enc = AESEncyptString(knm...
tolga
1

votes
3

answer
37

Views

Incorrect encoding on Php file but not on Html file

I write this code in Html file Try with special character (ì) When I display my html file it's all ok Try with special character (ì) But when I rename my html file in php file this is the result Try with special character (�) Someone can help me to understand?
Riccardo Suprani
1

votes
2

answer
70

Views

Sometimes I get an empty response and sometimes response works perfectly in angularjs

Im working with mysql and php with angular this is the code for the posting data app.controller('buscar', function ($scope, $http) { $scope.postData = function () { var request = $http({ method: 'POST', url: 'busqueda.php', data: { cedula:$scope.cedula }, headers: { 'Content-Type': 'application/x-w...
camilo mancilla
1

votes
2

answer
49

Views

regex match last char in LF

I am trying to match last char in lines like : 11/30/2017 6:05:34 PM 11/16/2017 12:47:31 PM 11/28/2017 12:43:33 PM 11/21/2017 9:24:55 AM as each line finishes with capital M, I thought it would be best to try to match Ms. [^M]\n doesn't seem to work, any ideas?
Alex
1

votes
0

answer
54

Views

asp.net core running on docker not encoding Latin characters correctly

Asp.net core 2.0 web api running in a Docker container using the official Microsoft Docker image (microsoft/aspnetcore) Code: [HttpGet] [Route('test')] public IActionResult Get() { return Ok('Sedán'); } Problem: The word Sedán gets encoded to Sed�n when running in Docker. On Windows it gets e...
Fahad
1

votes
1

answer
27

Views

How to print national charset tables?

I would like (for pedagogic purpose) to display the tables of some national charsets, e.g. ISO 8859-9 (latin-9), ISO 8859-5 (Cyrillic), ISO 8859-6 (Arabic), CP1252, MacRoman, etc. For example : 0 1 2 3 4 5 6 7 8 9 a b c d e f 3: 0 1 2 3 4 5 6 7 8 9 : ; < = > ? 4: @ A B C D E F G H I J K L M N O...
Jacquelin Ch
1

votes
0

answer
46

Views

& as & in XML not working for google search console

I did read many articles including this one but still can't make it to work. I have an xml with a link shown like this: https://afremov.com/en/?target=product&product_id=8460 but sitll getting an error from google and this from validator.w3.org: If you meant to include an entity that starts with '&'...
frankazoid
1

votes
1

answer
80

Views

Fixing mojibakes in UTF-8 text

I have a file with text in Portuguese in UTF-8. Somehow, who produced the file selected the wrong encoding, and the text is full of mojibake: IDENTIFICAÌàÌÄO instead of identificação André instead of André Automated tools do not see anything wrong with the file. I tried to fix it with Pyth...
Strabonio
1

votes
1

answer
28

Views

Wierd problems when insert Chines characters into MySQL via Windows cmd

My Envirionment System: Windows 7 64-bit Database: MySQL 5.7.20 64-bit Locale: Chinese cmd code page: CP936 MySQL setting system variables: enter image description here table info: enter image description here My Problem Under the environment and db setting described above, I tried to insert an reco...
shawnwinder
1

votes
1

answer
54

Views

php vs charset vs redhat vs suse [closed]

When I export data from DB on RedHat 7.4 with PHP I get file with unknown encoding: file -i produkte_de.csv podukte_de.csv: text/plain; charset=unknown-8bit I made dump of DB from RH and import into DB on Suse Tumbleweed and use same PHP code for exporting into CSV file, I get: file -i produkte_de.c...
Kolesar
1

votes
1

answer
364

Views

Python - cannot decode html (urllib)

I'm trying to write html from webpage to file, but I have problem with decode characters: import urllib.request response = urllib.request.urlopen('https://www.google.com') charset = response.info().get_content_charset() print(response.read().decode(charset)) Last line causes error: Traceback (most r...
Robin71
1

votes
0

answer
288

Views

Special Characters Don't Display Correctly in Laravel

I have a Laravel application on my local machine, all strings show well. I pass the application to another pc, open a port and now I can access remotely but the the words with special character don't show. For example, to print user auth name I have this {{ Auth::user()->name }} The name is John M...
user3242861
1

votes
0

answer
54

Views

Query ODBC incomplete - missing rows that contain 'ñ'

I have a connection with iSeries Access ODBC Driver - 64bits; with PHP When I ask a query from the database, the result show certain rows, but not all, when I change the query I can see that the character 'ñ' just shows as a black weird symbol: . Maybe my driver or PHP dont decode the special chara...
FranzSif
1

votes
1

answer
42

Views

exporting ang retrieving data from excel to database using php

I am trying to create a feature in my program where in you could upload data to the database by uploading data from excel (uploading excel file) i have provided the code below but the data in the database is encoded(i provided a screenshot). is there something wrong with the code? Excel format: fir...
1

votes
1

answer
76

Views

Does Unicode have a special marker character?

My father created in mid 90's an encoding for his engineering purposes for his company's computers. It was close to ISO 8859-2 (Latin 2), but with some differences. For example there was added a special 'MARKER CHARACTER'. This character wasn't determined to be a literal, but also it wasn't a contro...
aleskva
1

votes
0

answer
40

Views

Text en/decoding issue

I'm hoping someone can relieve me of my ignorance here: I'm using python 3.6.4 currently and I'm trying to convert strings to simple alphanumerics. I've got the how mostly sorted until I get to characters with diacritics. It involves football team names so I'm looking to convert, by way of example,...
Tim Hamilton
1

votes
1

answer
50

Views

Character encoding error difficult to handle in code

My Python3 application receives from stdin from a external device. The character stream can sometimes have accented characters. The immediate problem is 0xE9, or an accented e. The application looks somewhat like this: while True: for raw_line in sys.stdin: self.__process_line(raw_line) When the inp...
George Shaw
1

votes
0

answer
710

Views

Asp.Net Core 2.0 MVC app: return response in non-utf8 character encoding

I did the following: Installed System.Text.Encoding.CodePages 4.4.0 In Startup.ConfigureServices() I have: Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); In CustomersController public async Task Register() { ... return View(); } Register.cshtml content like below: @{ Layout = null; }...
synergetic
1

votes
0

answer
41

Views

MySQL select not work correctly on fields contain accents

Hi guys i have a problem with my DB, in detail i have this table: CREATE TABLE `energy_vector` ( `id` char(36) NOT NULL, `creation_date` datetime DEFAULT NULL, `modification_date` datetime DEFAULT NULL, `denomination` varchar(255) DEFAULT NULL, `aliases` longtext, PRIMARY KEY (`id`) ) ENGINE=InnoDB...
alvarofvr
1

votes
1

answer
58

Views

Dataframe calculation, anchor cell value to formula

I would like to do some calculations with the following dataframe. There are some values in specific cells of a column, and I would like to have them replicated based on a second column value, and store these in a new, third column: x
BAlpine
1

votes
0

answer
42

Views

Issue while copying files having filenames with foreign character in Linux

I am writing java program and trying to copy files from one folder to another in Linux. But for some files i am getting NoSuchFileException exception while copying files having french character in filename. Actual Filename : NéwlyCreâtêd.csv But in linux instead of foreign charaters it is autom...
Roshan
1

votes
0

answer
1.3k

Views

JS File upload: Detect Encoding

So, I'm trying to write a CSV-file importer using AngularJS on the frontend side and NodeJS for the backend. My problem is, that I'm not sure about the encoding of the incoming CSV files. Is there a way to automatically detect it? I first tried to use FileReader.readAsDataURL() and do the detection...
DCH
1

votes
0

answer
153

Views

SOLR 6.6 - Plugin Initializing failure

I am using SOLR with Magento an I have problem: While I get alphabetically sorted data from SOLR it's using latin alphabet and I would like to get it in polish, so I want: a, b, c...s, ś...z but i get: a, b, c...s...z, ś Note: 'ś' is polish character, it falls after 's'. 2. So I change in schema....
Stewart Wallace
1

votes
1

answer
111

Views

Java string replace special characters (Bulgarian, Polish, German) [duplicate]

This question already has an answer here: Remove diacritical marks (ń ǹ ň ñ ṅ ņ ṇ ṋ ṉ ̈ ɲ ƞ ᶇ ɳ ȵ) from Unicode chars 12 answers Java Regex String#replaceAll Alternative 2 answers I have a string surname. I want to replace special Bulgarian. Polish Characters with an English st...
Jonny Townsend
1

votes
0

answer
758

Views

Laravel and MSSQL not UTF8 charset

So I have outside MSSQL database, I can connect, but some charset are displayed as '����' symbols. Laravel database config (I'm using Laravel version 5.5.32 + php 7.2): 'driver' => 'sqlsrv', 'host' => env('MS_DB_HOST', 'localhost'), 'port' => env('MS_DB_PORT', '1433'), 'database' => env('MS...
Aleksandr

View additional questions