Skip to content
Advertisement

Tag: utf-8

Decode string with x in PHP that has char encoded over 255

My problem is about string decoding. Let’s assume a string like: I want to decode it and to look like that: λƛ¬∧⟑∨⟇÷ €½∆ø↔¢⌐æ I tried to use But it’s not what was expected. In python something like that works: Answer You don’t need to decode that. This is legal notation for strings in PHP. https://3v4l.org/0e0Po

Codeigniter 4 localization issue with UTF-8 characters

The context I am trying to perform a lemmatization of some texts and I figured out that I can use CI4 localization for this. Basically I created some files in AppLanguagesro-RO and I am “translating” the words to their linguistic root. The language files are encoded in UTF-8 (I checked it on the server with file -i command). PHP has

PHP find the charset set by setlocale

All my websites use UTF-8 as charset. But there are some issues when setting setlocale and getting localized strings from strftime for month names and weekday names. issue: Localizing month names do not work on the server. issue: How to know if the locale stings are in UTF-8 or ISO? Concrete: I set the locale like this: On my development

utf8_encode difference between result in SQL and PHP

I’m using utf8_encode to make sure that the input from my users is transforming the special characters to a character where my MYSQL can do a search on. (My database is set in latin1_swedish.ci). When I echo my query, I get a perfect query that I can run against my MYSQL (and I get an result). But when I do

Dompdf-Laravel Unicode character not rendering correctly

I am using barryvdh/laravel-dompdf to load PDF’s in my laravel application. I need to load custom unicode fonts(sinhala) in to the pdf. To do this, I downloaded my external fonts and copied the font folder and then it load to storage/fonts directory by load_font.php. I have used css in my blade file as follows: I also set meta tag UTF-8

Failed to connect to MySQL: Server sent charset unknown to the client. Please, report to the developers – SamplePage.php

For some reason, I can’t create the employeeTable on the sample database when opening the SamplePage.php on my Chrome browser from the following link: http://ec2-13-57-28-240.us-west-1.compute.amazonaws.com/SamplePage.php I was able to create my EC2 Instance from the AWS Create an EC2 Instance and Install a Web Server tutorial on the following link: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Tutorials.WebServerDB.CreateWebServer.html I get the following error: Failed to connect to

Clean emoji in input

How can I clean my form inputs for characters like emojis? For example, when I post a paragraph in a text area with an emoji like this ????, a Record does not gets inserted to database. I can not change …

Advertisement