Help required for Kanji characters in UNIX


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Help required for Kanji characters in UNIX
# 1  
Old 02-04-2009
Help required for Kanji characters in UNIX

Hi,

I have a flat file containing Japanese(Kanji) characters.When I open it in my desktop it still shows up in Kanji characters. However when I FTP the file to Unix server , the kanji characters are lost and they turn into Junk characters. Can anyone suggest ways in how I can retain the Kanji characters in the UNIX server as well.I have tried ftp>Bin.....but it doesnt work out. Please help


Thanks
Papiya
# 2  
Old 02-05-2009
I think the problem is that the kanji characters are stored in different integer
notation on one box to the next.

This phenomenon occurs a lot in japanese email, and i think, is called "gojimake".

The solution is nasty:

You must translate the binary values on the computer where the kanji look correct,
into their ASCII numeric characters. ( ie. 00010010101 into "27182" )

This could be done using a C program.

Then, within html, you can get the Japanese characters by specifying:

<meta charset='x-euc-jp' >

in your html at the top....
and then accessing the spelled out numbers like:

&27182;

This is the preferred method -- as this is not confused between machines
with different binary integer encoding.
# 3  
Old 02-05-2009
Oh, and alternative solution:

The names of the different internal integer formats are Big and Little Endian notation.

In the 4 bytes that make up an integer, the first 2
represent the high bits in one notation -- and the low bits in the other.

You could write a C program to read the file into a long integer,
swap the high and low order bytes, print it out in ASCII and there you go.

Let me know if you need more help than this.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help required in UNIX commands

I have 40000 records in a file where i need to change the 7th field date format from 05142016 to 20160514 I have given field below. any help would be highly appreciated. 364512|9999999|9999999|210553|195495477|195257095|05142016|10009|36313 ---------- Post updated at 05:02 AM... (2 Replies)
Discussion started by: arun888
2 Replies

2. Shell Programming and Scripting

Recursivly rename folders removing characters as required

HI guys here's hoping some on pout the can help I have a large library of epub and mobi file creates some what by calibre. Output of tree listing below I would like to recursively rename the directories removing the brackets and numbers I have been scratching my head over... (4 Replies)
Discussion started by: dunryc
4 Replies

3. UNIX for Dummies Questions & Answers

Rename file to kanji -- Solaris

Hi, My shell script calls a perl script to create an excel and the shell script emails the excel. This excel file needs to be renamed to some Kanji name. I have a flat file that has the required file name in kanji and i extract it within the shell script and try to rename the file, but... (3 Replies)
Discussion started by: tariq_m
3 Replies

4. Shell Programming and Scripting

Unix script required

I have a file 123.txt which is aasaasas=1 bsasasasasa=2 sawqas=3 I want my output to be 1 2 3 I am new to scripting can some1 help me out. (14 Replies)
Discussion started by: karthikkasarla
14 Replies

5. UNIX for Dummies Questions & Answers

How to paste Kanji Characters into a Unix File

Hi, I am unable to copy Kanji characters into a unix file. They look like special characters when pasted into the Unix file. My objective is to copy these characters into a unix file and be able to print it and see the Kanji characters. Any help would be greatly appreciated. I am trying this... (1 Reply)
Discussion started by: andrussw
1 Replies

6. Shell Programming and Scripting

Getting required fields from a test file in required fromat in unix

My data is something like shown below. date1 date2 aaa bbbb ccccc date3 date4 dddd eeeeeee ffffffffff ggggg hh I want the output like this date1date2 aaa eeeeee I serached in the forum but didn't find the exact matching solution. Please help. (7 Replies)
Discussion started by: rdhanek
7 Replies

7. UNIX for Advanced & Expert Users

Help required regarding Unix Signal

It is required to trap the signal send to a daemon process before rebooting a unix server. Suppose a script abc.ksh is running in the server as daemon. Before rebooting the server, the unix admin kills all the daemon processes. It is not known to me how admin kills the processes; I mean by which... (9 Replies)
Discussion started by: k_bijitesh
9 Replies

8. UNIX for Dummies Questions & Answers

Unix command help required

Hi All, Can anyone please help me in sort out the command to get the following command say File abc.log contains .... ...... This is the first line This is the second line This is the third line This is the fourth line This is the fifth line This is the first line This is the... (7 Replies)
Discussion started by: thaduka
7 Replies

9. UNIX for Dummies Questions & Answers

Help Required in Unix Command

Hi All, Can anyone please help me in unix command Query: ==== File contains data along with date and time stamp like, .. Date: 08:23:2005 01:00:00 method: xyz init variables Date 08:23:2005 01:00:01 method: xyz finished init variable .... (2 Replies)
Discussion started by: thaduka
2 Replies

10. UNIX for Dummies Questions & Answers

UNIX PATH info required PLEASE HELP (I'm new to unix)

I need to know how to enter a unix path in a cgi script for a guest book: example: My URL is http://www.kitachi.info I have an html file in the main folder on my site, the file is called : gbook.html what would the correct unix path for this file be ??? the part of the script... (1 Reply)
Discussion started by: akitachi
1 Replies
Login or Register to Ask a Question