473,767 Members | 1,627 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 3824
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
2193
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
1645
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
2110
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
4672
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
2248
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
9571
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
10169
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
10013
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...
1
9960
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9841
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
8838
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
5280
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
5424
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2807
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.