473,386 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

korean encoding, sort order off anyhow

hi,
To see the query results in native language see

http://database.sarang.net/?inc=read...eyword=&page=1

the simpler url is

http://database.sarang.net/?criteria=pgsql

becase there is no korean postgresql list. poster is "joesp"

basically the characters are off when sorting. As for how the koreans are doing things, that's why I'm asking them on database.sarang.net. BTW is there another location to look for help in korea, if you are aware of one I would like to know it.

I am at a crossroads why after the following the sort order is off. I think I've followed all the advice from the manual, as well.
[postgres@www pgsql]$ initdb --locale=ko_KR --lc-messages=C -E unicode -D `pwd`/unidata

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locales
COLLATE: ko_KR
CTYPE: ko_KR
MESSAGES: C
MONETARY: ko_KR
NUMERIC: ko_KR
TIME: ko_KR

creating directory /bup/pgsql/unidata ... ok
creating directory /bup/pgsql/unidata/global ... ok
creating directory /bup/pgsql/unidata/pg_xlog ... ok
creating directory /bup/pgsql/unidata/pg_clog ... ok
creating directory /bup/pgsql/unidata/base ... ok
creating directory /bup/pgsql/unidata/base/1 ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 1000
creating configuration files ... ok
creating template1 database in /bup/pgsql/unidata/base/1 ... ok
initializing pg_shadow ... ok
enabling unlimited row size for system tables ... ok
initializing pg_depend ... ok
creating system views ... ok
loading pg_description ... ok
creating conversions ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok

Success. You can now start the database server using:

/usr/local/pgsql/bin/postmaster -D /bup/pgsql/unidata
or
/usr/local/pgsql/bin/pg_ctl -D /bup/pgsql/unidata -l logfile start

[postgres@www pgsql]$
[postgres@www pgsql]$ pg_ctl -D /bup/pgsql/unidata/ -o "-p5433" start
postmaster starting
[postgres@www pgsql]$ LOG: database system was shut down at 2004-06-16 15:57:34 CDT
LOG: checkpoint record is at 0/9F60DC
LOG: redo record is at 0/9F60DC; undo record is at 0/0; shutdown TRUE
LOG: next transaction ID: 490; next OID: 17207
LOG: database system is ready
[postgres@www pgsql]$
[postgres@www pgsql]$ psql -p 5543 -d template1
Welcome to psql 7.5devel, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

template1=# \dt
No relations found.
template1=#create database korean;
CREATE DATABASE
template1=\c korean
template1=\q
[postgres@www bup]$ psql -p 5543 -d korean < korean.sql
..... many insert statements, etc, as korean.sql is dump of other korean db
[postgres@www bup]$ psql -p 5543 -d korean
Welcome to psql 7.5devel, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

korean=#
korean=# \encoding utf8
korean=# select id,word from korean order by word;
id | word
----+----------
68 | 생성
72 | 두가지
67 | 설문
69 | 단순하게
66 | 강좌
73 | 깔다
65 | 막막
70 | 반면
71 | 지*
(9 rows)

korean=# \encoding unicode
korean=# select id,word from korean order by word;
id | word
----+----------
68 | 생성
72 | 두가지
67 | 설문
69 | 단순하게
66 | 강좌
73 | 깔다
65 | 막막
70 | 반면
71 | 지*
(9 rows)
(the order is incorrect and unsorted)
korean-# \l
List of databases
Name | Owner | Encoding
-----------+----------+----------
korean | postgres | UNICODE
template0 | postgres | UNICODE
template1 | postgres | UNICODE
(3 rows)

korean-#


--
joe speigle
www.sirfsup.com

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #1
0 1719

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

Similar topics

0
by: Nicholas Pappas | last post by:
Hello all. I'm still having some trouble with getting Java work its way through Korean directories and filenames. I was able to load the strings in properly (using Cp1252 as the charset), and...
7
by: Erik Bethke | last post by:
Hello All, I have found much help in the google archives but I am still stuck... here is my code snippet: path = os.getcwd() path = path.decode('UTF8') Now the trouble is I am getting that...
40
by: Elijah Bailey | last post by:
I want to sort a set of records using STL's sort() function, but dont see an easy way to do it. I have a char *data; which has size mn bytes where m is size of the record and n is the...
4
by: Leora Wenger | last post by:
We moved some pages of Japanese, Korean and Chinese from one server to another. In doing so, the users with Windows XP could still see the Asian fonts. However, a user with Windows 2000 could no...
1
by: culley harrelson | last post by:
Someone put some Korean words in my SQL_ASCII database: http://www.flashcardexchange.com/quick_view.php?id=238165 When you change the encoding of you browser to EUC-KR it looks suspiciously...
0
by: joseph speigle | last post by:
hi, To see the query results in native language see http://database.sarang.net/?inc=read&aid=5368&criteria=pgsql&subcrit=qna&id=&limit=20&keyword=&page=1 the simpler url is ...
0
by: Chris McDonough | last post by:
ElementTree's XML serialization routine implied by tree._write(file, node, encoding, namespaces looks like this (elided): def _write(self, file, node, encoding, namespaces): # write XML to file...
4
by: wheel | last post by:
I have already built in support for multiple languages in some of my applications, but so far they have only used Western languages (English, Spanish, etc). I need to add some Far East languages:...
13
by: ralphedge | last post by:
These sorts work fine on 100000 ints but if I go much higher they will both segmentation fault **************************MERGESORT********************* mergesort(int *a, int size) //a is...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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...

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.