473,545 Members | 1,890 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

coding: cp1252, coding: windows-1252 stop working

103 New Member
OS: windows
Python 3.3.5

I am using characters like 'öÖäÄåÅąĄčČęĘėĖ įĮšŠųŲūŪžŽ' in my scripts and adding the script file the first line
Expand|Select|Wrap|Line Numbers
  1. # -*- coding: cp1252 -*-
Currently i start getting the error: "Invalid encoding cp1252" when i try to save the file.
And error "encoding problem: windows1252 with BOM" when i try to run the file.


I also have tried other encodings like:
cp-1252
windows-1252
windows1252

What i can do. How to use characters 'öÖäÄåÅąĄčČęĘėĖ įĮšŠųŲūŪžŽ' in my script?
Oct 3 '14 #1
3 4132
stdq
94 New Member
Hi! I'm not sure, but this might help: try changing your line of code to

Expand|Select|Wrap|Line Numbers
  1. # -*- coding: utf-8 -*-
Also, try changing the file encoding to UTF-8.
Oct 3 '14 #2
dwblas
626 Recognized Expert Contributor
A simple search came up with Mapping Windows CP1252 Gremlins to Unicode so it is almost certain that there are additional sites from people who have already solved this problem. Pick the one you like best as there is no point in reinventing the wheel here.
Oct 3 '14 #3
gintare
103 New Member
Thanks stdq. It have helped. I mean the line:
Expand|Select|Wrap|Line Numbers
  1. # -*- coding: utf-8 -*-
Oct 4 '14 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1950
by: g | last post by:
Hi, I am using VS 2002 coding against the calendar folder in outlook 2002 with c#. I'm monitoring add and remove of Calendar items. I assign the add event on the calendar folder and watch the add items on the Deleted folder. This works well 2-3 times, but after that I don't see any more events.
2
1654
by: Adlai Stevenson | last post by:
Ok, the good news is the last kernel upgrade made bzflag stop working. The bad news is that mplayer, ogle and real player stopped working ! Is anybody in a similar boat? I am using Suse 9.1 Pro with the latest download kernel.
0
1348
by: Adrian Stovold | last post by:
I've written an ASP.NET application in VB.NET. It works fine on all Windows platforms and browsers, but there's a problem on the Mac version of IE (v5.1.5) running on Mac OS 9.2. I can reproduce the problem as follows: In my application I have two pages. Page 'A' lists records from a database. I click on the link to the first record and...
2
1428
by: GGW | last post by:
Hi, I am building a Ecommerce site using usercontrols. I built a search control that uses the Ontextchaged event. The control was place manually on the page- not dynamiclly. All was working fine then it just stopped working. So I tried placing a simple button on the form & same result - no go. I do have other user controls that contain...
2
3985
by: Martyn Fewtrell | last post by:
Dear All I have a Windows 2003 Server with IIS6 where the validation controls on ASP.Net pages no longer work. I believe it to be specific to the server as if I create an ASP.Net page on the IIS Server of my Workstation (Win XP) with a text box, button and required field validator, this works fine. If I create the same page on the IIS6...
7
3011
by: z f | last post by:
Hi, i have a vb.net web application that uses validators. on my dev machine (Xp pro) it works fine. on the hosting machine (win2003) the validator (client side and server side ) stop working. i thought it might be related to norton internet security, so i disable it, but it also don't explain why local works and hosting not.
2
2184
by: chrisexv6 | last post by:
Recently been having an issue pop up with a web service thats been running fine for months. The service in question takes calls from our public web server, then logs data to a database server behind a firewall. The code has been in place (and working fine) for months. Now we have a slightly larger load on the server (nothing it shouldnt...
7
8633
by: Daniele Piccinini | last post by:
Hallo, I've writed a C# windows service in VS 2003. This service use a System.Timers.Timer to periodically call some functions of a web service. ( Some of this functions required minutes to be executed ). The timer interval is 1 sec, and each functions 'counts' his number of timer clock to know when it must be executed. Sometimes happen...
3
2463
by: lds | last post by:
On our server we have both applications that have been migrated to use v2.0 of the framework as well as apps that have not yet been migrated and still use 1.1. When I tried to deploy my v2.0 app earlier today it would not work. We restarted IIS and evenutally it started working, but not right after it restarted. Once it finally started...
4
2262
by: Adam Tippelt | last post by:
Situation: I'm using a continuous form to display a lot of information stored in a datasheet. I'm using the form because it allows me to display multiple rows of information per 'record' which is needed as some of the records have a lot of text. However, I've needed to apply both a form of filtering system, and a way of re-ordering the form so...
0
7410
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7668
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7923
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7437
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7773
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5984
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5343
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4960
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.