[wingide-users] encoding problem
brian.downing at yakkadesign.com
Tue Jun 5 13:42:01 MDT 2012
for the coding I had |||# -*- coding: utf-8 -*-|||. I added this after
I reverted back. Is that comment different from |||#coding:utf-8 |||?
I got the problem fixed. I changed the encoding back to cp1252,
reverted the file, added the utf header, and set the encoding in wing to
On 6/5/2012 3:07 PM, Wingware Support wrote:
> brian downing wrote:
>> My default encoding was cp1252 on windows 7. I copied some html that
>> was utf-8 into unicode strings in a python script. In wingware I
>> changed the encoding to utf-8. I made a few changes to the file and
>> used my revision control to revert back to a pre-encoding change
>> version. Now in the source code I see weird characters. How should I
>> fix this?
> Do you have a coding comment at the top of the source file? I'd add
> that if it's not there, like this:
> Then you'll have to retype/re-paste the corrupted characters. It
> looks like Wing stored the file as utf-8 but the revision control
> system acted on it like it's cp1252. I don't know if adding the
> coding comment in the file will prevent this in the future, but it's a
> good idea not to assume files matching system or IDE defaults.
> Another idea would be to change the encoding in Wing back to cp1252
> for that file and tell Wing to re-read it from disk, then add the
> coding comment after that. That might be easier if more of the file
> contents is in cp1252 than in utf-8.
> You could of course also save a copy of the file in each encoding then
> copy/paste content over or use Wing's diff/merge tool to compare and
> merge the files.
More information about the wingide-users