Encoding: LATIN2 (hungary)

Started by Sipos Andrasabout 25 years ago4 messagesgeneral
Jump to latest
#1Sipos Andras
s-andras-nospam4@freemail.hu

Hi,

I want to set encoding hungarian language.
I try to set LATIN2, but char order is "�abc..".
The good order is "a�bc...".

What is the soultion?

Thx,
Andras
ICQ: `find s-andras@freemail.hu`

#2adb
adb@Beast.COM
In reply to: Sipos Andras (#1)
how do I get arbitrary sql results as strings in C

Is there an easy way in libpq to get the results from
any query as strings.

Imagine a cgi where you input any query and then it prints
out the rows returned

Something like this example of mysql code:

// fetch each row using mysql_fetch_row
MYSQL_ROW row;
unsigned int num_fields;

if( sql_result ) {
num_fields = mysql_num_fields( sql_result );

while( ( row = mysql_fetch_row( sql_result ) ) ) {

outputBuf_.print( L"<r>" );
for( unsigned int i = 0; i < num_fields ; i++ ) {
char * rowVal = row[i];
if( !rowVal ) {
rowVal = "";
}

outputBuf_.print( L"<c>%a</c>", rowVal );
}
outputBuf_.print( L"</r>\n" );
}
}

Thanks,

Alex.

#3adb
adb@Beast.COM
In reply to: adb (#2)
Re: how do I get arbitrary sql results as strings in C

If there's no simple way to do this, I think I found an example of what I
need in function printQuery in psql/print.c

Alex.

On Fri, 23 Feb 2001, adb wrote:

Show quoted text

Is there an easy way in libpq to get the results from
any query as strings.

Imagine a cgi where you input any query and then it prints
out the rows returned

Something like this example of mysql code:

// fetch each row using mysql_fetch_row
MYSQL_ROW row;
unsigned int num_fields;

if( sql_result ) {
num_fields = mysql_num_fields( sql_result );

while( ( row = mysql_fetch_row( sql_result ) ) ) {

outputBuf_.print( L"<r>" );
for( unsigned int i = 0; i < num_fields ; i++ ) {
char * rowVal = row[i];
if( !rowVal ) {
rowVal = "";
}

outputBuf_.print( L"<c>%a</c>", rowVal );
}
outputBuf_.print( L"</r>\n" );
}
}

Thanks,

Alex.

#4Tatsuo Ishii
t-ishii@sra.co.jp
In reply to: Sipos Andras (#1)
Re: Encoding: LATIN2 (hungary)

I want to set encoding hungarian language.
I try to set LATIN2, but char order is "�abc..".
The good order is "a�bc...".

What is the soultion?

configure PostgreSQL with --enable-locale option and rebuild it.
--
Tatsuo Ishii