Category "utf-8"

Properly parsing mixed codepage strings?

I have this weird state that my db got into. Basically, some text is in mixed mode. windows-1252 and miscoded utf-8. Here's a sample: "donc d'être transpa

How to print unicode from a generator expression in python?

Create a list from generator expression: V = [('\\u26' + str(x)) for x in range(63,70)] First issue: if you try to use just "\u" + str(...) it gives a decoder

codeUnits property vs utf8.encode function in Dart

I have this little code: void main(List<String> args) { const data = 'amigo+/=:chesu'; var encoded = base64Encode(utf8.encode(data)); var encoded2 =

codeUnits property vs utf8.encode function in Dart

I have this little code: void main(List<String> args) { const data = 'amigo+/=:chesu'; var encoded = base64Encode(utf8.encode(data)); var encoded2 =

Convert between std::u8string and std::string

C++20 added char8_t and std::u8string for UTF-8. However, there is no UTF-8 version of std::cout and OS APIs mostly expect char and execution character set. So

Convert between std::u8string and std::string

C++20 added char8_t and std::u8string for UTF-8. However, there is no UTF-8 version of std::cout and OS APIs mostly expect char and execution character set. So

PHP: convert all UTF-8 characters to HTML entities

I am attempting to use mb_encode_numericentity() to convert all special UTF-8 characters into HTML entities. The following code converts some characters, like &

Left and right quotation mark render as unexpected character in Safari

I have a simple piece of text like so: <h1 class="intro-text" id="main-title">&lsquo;AN ABRAM&rsquo;</h1> This should render the f

jsp encoding display issue

I am finding a issue where the data is encoded properly in the controller and compiled jsp, but is not displaying properly within an alert statement (or on the

How to remove BOM from an encoded base64 UTF string?

I have a file encoded in base64 using openssl base64 -in en -out en1 in a command line in MacOS and I am reading this file using the following code: string file

Escape sequences for char8_t and unsigned char

Trying to use escape sequences to construct a char8_t string (to not rely on file/compiler encoding), I got issue with MSVC. I wonder if it is a bug, or if it i

RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment

I tried to deploy my flask application in a docker in ubuntu18.04, and I was using python3.5 in my pipenv. But when I run docker build -t flask ., at a step of

SQL - UTF-8 to varchar/nvarchar Encoding issue

Problem background - I am receiving response data from a website, formatted in json and UTF-8 encoded. A body attribute of json has values in a base64binary typ

VS Code terminal unable to privide UTF-8 input

I'm hopeful that this question is a duplicate, but I have searched a lot at this point, and I've not come across anything helpful, so I am dubious. The followin

How to solve error UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 106: invalid continuation byte in tensorflow

I need help to deal with an error... I try to create an object detection program with a tutorial made by lazy tech on Youtube. This tutorial use this repo on gi

Incorrect string value error for unconventional characters

So I'm using a wrapper to fetch user data from instagram. I want to select the display names for users, and store them in a MYSQL database. I'm having issues in

properly logging unicode & utf-8 exceptions in python 2

I'm trying to log various exceptions from libraries in python 2.7. I find that sometimes the exceptions contain a unicode string and sometimes a utf8 bytestring

Spring Controller @ResponseBody text/xml response UTF-8 encoding issue

I have annotation based Spring Rest Service running on jetty web server(also tomcat).The controller code is : @RequestMapping(method = RequestMethod.POST, val

Encoding 4 byte UTF-8 character to JSON from Rails produce invalid character

I have a web service in rails (3.2.19) that encode a JSON to be read by some iOS or Android apps. The json might contain any characters, but it seems to fail ev

Which is the correct encoding for a degree character?

I have a line of code that alters text temperature<-as.numeric(gsub("°.*","",temp)) R does not like the "°" character. When I save the file it says