Quantcast
Channel: Active questions tagged utf-8 - Stack Overflow
Browsing all 1064 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

How to solve "The byte stream was erroneous according to the character...

In my mozilla log, I get the following error:The byte stream was erroneous according to the character encoding that was declared. The character encoding declaration may be incorrect.Meanwhile, under my...

View Article


Image may be NSFW.
Clik here to view.

C# files unreadable after pushing to github. Encoding seems to be wrong. How...

I had an old project I was going to reference, I know originally it was on windows when I created, pushed to GitHub, I cloned it on a Mac, and added it to a different repo that I keep specifically for...

View Article


C# RestRequest Multipart request AddParameter with Arabic UTF-8 Character

My Below code is not working if I put one of the json field content as arabic.Its working fine for english and other character.RestClient client = new RestClient(myApiUrl);RestRequest request = new...

View Article

Why encoding change api does not work in php? [duplicate]

I need to save a UTF-8 text in a file with PHP using this code:<?php$filename = "";if ($handle = opendir("test")) { while (false !== ($file = readdir($handle))) { $filename = $file; }...

View Article

u'\ufeff' in Python string

I got an error with the following exception message:UnicodeEncodeError: 'ascii' codec can't encode character u'\ufeff' inposition 155: ordinal not in range(128)Not sure what u'\ufeff' is, it shows up...

View Article


Which Collation to use with SQL Server when VARCHAR can contain ANY possible...

The database is currently configured to use the collation Latin1_General_100_CI_AS_SC_UTF8 but that does not work for Arabic characters, and it has also issue with some Eastern European diacritics.I...

View Article

Ruby method to remove accents from UTF-8 international characters

I am trying to create a 'normalized' copy of a string, to help reduce duplicate names in a database. The names contain many international characters (ie. accented letters), and I want to create a copy...

View Article

How do I convert Unicode special characters to html entities?

I have the following string:$string = "★ This is some text ★";I want to convert it to html entities:$string = "&#9733; This is some text &#9733;";The solution everyone is writing...

View Article


Image may be NSFW.
Clik here to view.

JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal...

JNI method NewStringUTF expects input as a modified UTF8 string, the difference between Standard UTF-8 and modified UTF-8 is in how it handles the null (U+0000) character. In standard UTF-8, the null...

View Article


Weird first word read Python [duplicate]

I'm reading the first Harry Potter book as a UTF-8 file in Python (I've tried packages io and codecs), and the first word that is read, which is "harry" (lowercase because I first word tokenize the...

View Article

Posgtesql ODBC incorrectly loaded char(1) despite of setting client encoding...

I tried to select data with Cyrillic encoding by linux odbc postgresql driver in UTF8.I set client_encoding to UTF8.The data of column with length > 1 (for example, varchar(10) = 'инсерт' - in...

View Article

node.js Buffer latin1 encoding for characters out of range

I'm trying to understand the implementation of the latin1 encoding in the node.js Buffer implementation.In latin1, each character is represented by 1 byte.When I try to encode a character that lies...

View Article

Classic ASP and UTF-8

I'm changing my application to work with utf-8 pages.So every ASP page has this codeResponse.CodePage = 65001 Response.CharSet = "utf-8"And HTML<meta charset="UTF-8" /><meta...

View Article


'utf-8' codec can't decode byte 0xa0 in position 4276: invalid start byte

I try to read and print the following file: txt.tsv (https://www.sec.gov/files/dera/data/financial-statement-and-notes-data-sets/2017q3_notes.zip)According to the SEC the data set is provided in a...

View Article

black formatter for python gives a decoding error "not a utf-8 character" How...

on windows 11, with python 3.11trying to format any of my python.py filesI get this tracebackFINAL line says:UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd2 in position 16: invalid...

View Article


Listings in Latex with UTF-8 (or at least german umlauts)

Trying to include a source-file into my latex document using the listings package, i got problems with german umlauts inside of the comments in the...

View Article

Mongodb : An error occurred while loading navigation: Invalid UTF-8 string in...

I installed MongoDB Compass, and I get error message “An error occurred while loading navigation: Invalid UTF-8 string in BSON document”. I can't visualize my data.Version MongoDB 5.0.3(current)Windows...

View Article


Convert String (UTF-16) to UTF-8 in C#

I need to convert a string to UTF-8 in C#. I've already try many ways but none works as I wanted.I converted my string into a byte array and then to try to write it to an XML file (which encoding is...

View Article

Black formatter for Python gives a decoding error "not a utf-8 character" -...

I added a magic header:# -*- coding: utf-8 -*-No change in the results.Input file is created by intelliJ IDEA 2023.2.2.Several files give the same error.I see comments suggesting that utf-8 is standard...

View Article

python2.7 - How to decode JSON without decoding the UTF-8 inside of it?

I need a function to decode UTF-8 encoded JSON. This function should take a UTF-8 encoded JSON string and convert it to UTF-8 encoded objects. The following code works:# helper functiondef...

View Article
Browsing all 1064 articles
Browse latest View live