VS2015 UTF8 file open problems

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

VS2015 UTF8 file open problems

Postby urosg » May 19th, 2017, 8:01 am

Hi,

I have been experiencing some problems lately and I can not pinpoint where the problem is.

I have PHP files which include some UTF8 characters and are all saved without BOM.

When opening such files they are opened in Win1250 codepage and after saving the UTF8 chars are then broken, this didn't occur before.

I guess the automagic detecting doesn't work because the count of the UTF8 chars is small - i.e. usually only a couple, maybe even only one per file that is couple of kB in size.

Any suggestions on how to fix this are welcome.

Kind regards,
Uros
urosg
 
Posts: 51
Joined: February 24th, 2016, 2:05 am

Re: VS2015 UTF8 file open problems

Postby Jakub Misek » May 22nd, 2017, 12:20 pm

Hi,

This is handled be Visual Studio Editor itself. There is an option for UTF8 without BOM detection in Options / Text Editor (see the attachment)

The detection first tries to encode the file in UTF8, if it fails it continues with current system encoding.

I hope it helps.
You do not have the required permissions to view the files attached to this post.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: VS2015 UTF8 file open problems

Postby urosg » May 23rd, 2017, 10:53 am

Hi,

I have this set and also browsed around a little, usually this detection works OK, but not in this file, which is strange as I know it worked a while ago...

Also tried adding some UTF8 chars in a comment at beginning of the file but it didn't help.

If anyone has any suggestions they are very welcome!

Thanks!
urosg
 
Posts: 51
Joined: February 24th, 2016, 2:05 am

Re: VS2015 UTF8 file open problems

Postby Miloslav Beno » May 26th, 2017, 1:45 pm

Hello,

Could you please try latest preview and let us know? There were some changes related to UTF8 handling.

Thank you!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 35 guests

cron

User Control Panel

Login

Who is online

In total there are 35 users online :: 0 registered, 0 hidden and 35 guests (based on users active over the past 5 minutes)
Most users ever online was 256 on March 28th, 2024, 9:42 am

Users browsing this forum: No registered users and 35 guests