Category "utf-8"

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

If <meta charset=“utf-8”> means that JavaScript is using utf-8 encoding instead of utf-16

I have been trying to understanding why the need for encoding/decoding to UTF-8 happens all over the place in JavaScript land, and learned that JavaScript uses

How to set preferred encoding in WSGI to UTF-8

Feeling a bit crazy here. I've got Apache set up with mod_wsgi, but I can't get the encoding to work properly. I have: tested that mod_wsgi is running in daemon

How to convert binary string to normal string in php

Description of the problem I am trying to import email content into a database table. Sometimes, I get an SQL error while inserting a message. I found that it f

SyntaxError: Non-UTF-8 code starting with '\xd8' in file

I use persian language site for crawling site and get data and text with lxml library with my python 3.4 code. At this point everything is good text = "['