473,804 Members | 3,424 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re: Problems Writing =?ISO-8859-1?Q?=A3?= (pound sterling) To MSSQL Server using pymssql

On Mon, 2008-11-17 at 15:24 +0000, Tim Golden wrote:
Darren Mansell wrote:
Hi.

I'm relatively new to python so please be gentle :)

I'm trying to write a £ symbol to an MS SQL server using pymsssql .. This
works but when selecting the data back (e.g. using SQL management
studio) the £ symbol is replaced with £ (latin capital letter A with
circumflex).

This is a bit of a non-answer but... use pyodbc[*],
use NVARCHAR cols, and use unicode values on insert:
Thanks for the help. Unfortunately pyodbc seems to only work on Windows.
I need to connect to the SQL server from a Linux box.

The db schema is very set in stone, I can't do anything with it. I'm
currently opening autogenerated SQL scripts, decoding them from utf-16
and then back into utf-8 for pymssql to run them.

It's been working great for ages until someone noticed the £ symbols had
this extra character in there..

--
Darren Mansell <da************ @opengi.co.uk>

Nov 17 '08 #1
0 1320

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
3303
by: Kristian Nybo | last post by:
Hi, I'm writing a simple image file exporter as part of a school project. To implement my image format of choice I need to work with big-endian bytes, where 'byte' of course means '8 bits', not 'sizeof(char)'. It seems that I could use bitset<8> to represent a byte in my code --- if you have a better suggestion, I welcome it --- but that still leaves me with the question of how to write those bitsets to an image file as big-endian bytes...
12
7152
by: Eigenvector | last post by:
I've been dinking around with this code for a while now and I can't seem to figure out where the problem lies. The original problem was that I for some reason or another couldn't allocate few 80,000,000 element arrays. Normally that shouldn't be a problem but it was. So I tried to do some calloc calls and everything went south from there. Essentially I'm trying to read in a big file, stick each line into an array, then from then on do...
10
2191
by: Jason Curl | last post by:
Dear C group, I'm very interested in writing portable C, but I only have GNU, Sparc and Cygwin to compile on. What I find is the biggest problem to writing portable C is what headers to include. What sites do people know about that are comprehensive in their differences? For example, MacOSX complained about <string.h>. With Solaris I needed
15
2342
by: Cerebral Believer | last post by:
Hi all, I am a newbie to JavaScript and am just trying to get a script going that will write the ful date and time to each webpage as it is viewed. Can anyone point out what mistakes there are in my code, as it does not seem to work? I am actually trying to learn what parts of the code do what and why, so if anyone can take the time to explain it would be much appreciated. Here is my script: <script language="javascript">
1
3209
by: =?UTF-8?B?SmVucyBNw7xsbGVy?= | last post by:
(I also posted this to boost-user) The BGL implementation of breadth-first search uses a dedicated color map. I had the following idea: Some algorithms don't need to distinguish black/gray, but have an unused value in e.g. a distance map, e.g. -1, to which the map can be initialised. So I tried to write a map adapter which can be passed such a map together with the value indicating "white". This adapter will return
4
1596
by: Dr J R Stockton | last post by:
(A) Some of us in the UK will have been watching with amusement what seems to be happening in the USA and its Northern Sidekick with regard to the change in DST rules. I've discovered that the change will also be happening in the Bahamas (Commonwealth), Bermuda and Turks & Caicos (British Overseas Territories) - I wonder whether anyone told Her Majesty? (B) Date Validation - ISTM that using D = new Date(y, m', d) then
24
2041
by: rn5a | last post by:
The date in my local machine is set to the dd/MM/yyyy format. When I insert a date in a MS-Access DB table, it gets populated in the above format. For e.g. if the date is, say, 8th March 2007, it gets populated in the DB table as 08/03/2007 In other words, first the day is shown, then the month & finally the year but when I retrieve it in ASP.NET & using DatePart, try to extract the day & the month like this (assume that the date...
2
1547
by: akilascartas | last post by:
Hello all, I have been facing a problem for several weeks with my C++ code. First of all, I am going to expose how my files/classes are written: File ./SimulationManager/Simulation.h (with Simulation.cc in the same location, defining the functions) Classes: IControlSimulation (virtual) InputSimulation : IControlSimulation -->contains a reference to IOutput (through InputSimulation, SimulationEvents and OutputManager)
24
2427
by: tanmay | last post by:
please tell me how to get the following output using loops... 1) * * * * * * * * * * * * * * * *
84
3558
by: jacob navia | last post by:
As many people know, I think that garbage collection is a good solution for many memory allocation problems. I am aware however, that nothing is "the silver bullet", not even the GC. A recent article in slashdot http://developers.slashdot.org/article.pl?sid=07/11/17/0552247 proves that.
0
9577
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10569
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10325
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10075
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9140
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6847
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.