473,773 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PGCLIENTENCODIN G behavior of current CVS source

hi,
I'm using CVS source built postgres, may be one day later
then the main site, but found one problem:

I've set PGCLIENTENCODIN G environment before, for easy of
typing, like export PGCLIENTENCODIN G=GBK in my .profile,
but after I upgrade my postgresql to current CVS, I found
problem, the database initialized using:

initdb --locale=zh_CN.ut f8 ...

the database connected is UNICODE encoded, but when I
use psql to loging to one of my database, it response:

psql: FATAL: invalid value for parameter "client_encodin g": "GBK"

but when I remove the PGCLIENTENCODIN G setting:

unset PGCLIENTENCODIN G,

now I can login, but when I do a:

DHY_JJG=# \dt
ERROR: invalid byte sequence for encoding "UNICODE": 0xed

but, after:

DHY_JJG=# \encoding gbk
DHY_JJG=#\dt

woule be ok. the LANG setting is zh_CN.gbk, I guess it's
a localization problem. may be the encoding of thos po files.
because while using psql -E we see the query contain the
locale string in AS clause, but don't know the best way to
fix that, may be use UNICODE to encode those po files?

regards

Laser
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddres sHere" to ma*******@postg resql.org)

Nov 23 '05 #1
4 3825
Weiping <la***@qmail.zh engmai.net.cn> writes:
[ database encoding is unicode ]
now I can login, but when I do a: DHY_JJG=# \dt
ERROR: invalid byte sequence for encoding "UNICODE": 0xed but, after: DHY_JJG=# \encoding gbk
DHY_JJG=#\dt woule be ok.


This is a risk no matter what encoding is used in the client-side .po
files; as long as it's different from the current client_encoding ,
there is a potential for mis-conversion and other problems. I don't
see a simple solution. In this particular case, it would help if psql's
describe commands didn't assume they could send localized column headers
to the server --- but I don't think that solves all related issues.

BTW, Peter, it seems like this may be a good argument for keeping the
client and server .po files separate. They might need different encodings.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #2
I hate to ask for a restriction of the 1st ammendment, but the life of
many colleagues and mine would be much easier if those racists and
idiots would not waste our bandwidth.Nobod y but them is -to my beliefs-
interested in their flaming each other.

Please knock them off the board.

with kind regards
günter strubinsky
<st********@acm .org>

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #3
Am Dienstag, 16. November 2004 16:11 schrieb Tom Lane:
This is a risk no matter what encoding is used in the client-side .po
files; as long as it's different from the current client_encoding ,
there is a potential for mis-conversion and other problems. I don't
see a simple solution.


Here's the news: Not only the server encoding and the server locale have to
match. The same is true on the client side. In particular, in order to
avoid errors from the PO files, your LC_CTYPE and your PGCLIENTENCODIN G need
to be compatible.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddres sHere" to ma*******@postg resql.org)

Nov 23 '05 #4
guenter strubinsky <st********@acm .org> writes:
... I've been in this list
(on and off) since more than 3 years now. I was either off or this is
the first time that people forget their basic communication skills
(assuming they had those skills ever)


None of this is coming from actual list members. As far as I can tell,
it's just one net.kook who has decided to try to disrupt the list by
forging bogus mail that appears to come from list members (at least
to the list 'bot it looks that way --- you can tell the stuff is phony
by comparing the Received: headers to real mail from those people).

Ignore it, and the child will eventually get bored and go away. As long
as people keep rising to the bait, though, he'll probably keep trolling.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #5

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

Similar topics

1
2194
by: Henrik Weber | last post by:
Hi. I have tried to add pychecker as an extension to pythonwin. Now I can have pychecker check the source file that is currently open in the editor with a single keypress. If someone is interested, here is how to do it: Create an empty file in your <pythondir>\Lib\site-packages\Pythonwin\pywin directory. Give it a name with .cfg as extension.
6
1808
by: Marina | last post by:
Hi, Let's say I have one datatable, that I want to use as the datasource for 2 dropdowns. So both are bound to the same one. But now, when I select a row in dropdown A, the selected row in dropdown B changes to the same thing! Each dropdown represents a different column in the main record - they just happen to have the same options for their valid values.
3
1646
by: Andrew | last post by:
Hi all , i am supposed to create a program that performs a specific operation to a 2-D matrix whose elements are positive (or zero ). This operation is repeated T times on the matrix and only the final matix is needed . The operation to be perormed is V(t,x,y)=1/2*(sqrt(V(t-1,x-1,y))+sqrt(V(t-1,x-1,y))) . The problem iis that i have (or i think i have ) created a correct program that performs this operation but something happens that i...
22
2113
by: Liang Chen | last post by:
Is the file "bcopy.c" in the "libitery" directory the implement of the GNU C library function "bcopy"? If so, how can it run so fast?(copy-by-byte rather than copy-by-word) When I copy the code of "libitery/bcopy.c" to my own code, I find that it is so slow even if I turn on "-O3" and define "NDEBUG". Why?
6
4587
by: bob lambert | last post by:
Help, I have vb.net std 2002, have a windows forms app and am debugging code behind it. I think I am viewing the source, I set the project to debug (as opposed to release), I start the debugger, it stops at a breakpoint. But as I step through, it stops on what appear to be comment lines. It seems I am not looking at the code line for line as it is being executed (I expect comments
1
2940
by: Scott McFadden | last post by:
C++ has some nice macros for obtaining the current function name, current source file, and current line number (__FUNCTION__, __FILE__, __LINE__). Does C# have any comparable MACROS?
111
4678
by: Nate | last post by:
Hello, I am looking for a method to automatically declare variables in C. I'm not sure if there is a good way to do this, but I had something like this in mind... int i; for(i = 1; i < 4; i++){
35
2249
by: bukzor | last post by:
I've found some bizzare behavior when using mutable values (lists, dicts, etc) as the default argument of a function. I want to get the community's feedback on this. It's easiest to explain with code. This example is trivial and has design issues, but it demonstrates a problem I've seen in production systems: def main(argv = ): 'print out arguments with BEGIN and END' argv.insert(1, "BEGIN")
3
1373
by: Gabriel Genellina | last post by:
En Sun, 07 Sep 2008 14:00:48 -0300, Patrick Maupin <pmaupin@gmail.comescribió: Python takes some shortcuts when dealing with builtins. I'll just describe what happens (I won't say whether it is "right" or "wrong"). The exec statement, when given a string source, compiles it and eventually calls PyEval_EvalCodeEx, which creates a new frame using PyFrame_New and finally executes it. A frame object contains a pointer to the previous frame,...
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10106
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
9914
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
8937
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...
1
7463
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6717
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
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4012
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

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.