NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Display problems with UTF-8 encoded files


Joined: 28 Sep 2013
Posts: 21
Location: Pantin, IDF, France
Reply with quote
Hello,

I have problems in some projects with UTF-8 encoded files, like in this picture where comments in French are badly displayed:
Quote:

This happens in some projects, not all, although it is hard for me to tell on what is it related.
In this case, this file is located to a Linux computer in my local network, and it is opened via a network share.

I tried to set the encoding to UTF-8 in all places where I found an option for that, meaning in the global PhpED settings, in the project settings, and in the folder settings.
However, in the Folder Properties settings, the encoding is set to "System default encoding", the value is impossible to change (if I change it and click "OK", the dialog closes, but after reopening, it is still set to "System default encoding").

Quote:

(By the way, what does mean "System default encoding"? Which system is it related to?)

Also, some of my folders may contain files in different encodings (and they have to stay like this now), usually UTF-8 along with ISO-8859-1.
How can I select encoding independently for each file?
Couldn't this be detected automatically, like in the editor that I commonly use ("EditPlus"), which almost never made an encoding mistake for the 15 years I have used it without the need of any setting?

I use PhpED version 15.0 (Build 15036, 64bit).

Regards,

Gingko

P.S.: Would it be possible also to fix the image upload in this forum, behind the "Add image to post" link? Each time I want to upload an image, I get the following message: "Bad Request. Your browser sent a request that this server could not understand". Because of this, I had to host the above pictures on one of my servers, this is quite weird and subject to broken links once my server will no longer be available.
View user's profileFind all posts by GingkoSend private message


Joined: 27 Oct 2014
Posts: 9
Reply with quote
Hi, Gingko

You can manually change encoding of current file in the bottom right corner:


IDE may sometimes detect right encoding, but when it fails, it shows me window like that:
View user's profileFind all posts by todaySend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7881
Reply with quote
If a file has BOM or it is an HTML with appropriate meta with charset, the encoding for such files will always be detected. With other files, it's always a challenge. I'd recommend you to set correct encoding project-wide. If you don't use Windows-1251 in your project (and most likely you don't), set what you use IDE-wide -- tools->Settings->IDE Settings.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Display problems with UTF-8 encoded files
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic