Sponsored Content
Top Forums Shell Programming and Scripting Copying a file with UTF char on UNIX server Post 302941736 by ygemici on Monday 20th of April 2015 03:25:57 PM
Old 04-20-2015
Quote:
Originally Posted by varun22486
Ok, I changed my setting in putty->window->translation and it worked. As soon as i did sudo to application user it again stops working so something is getting change.. not sure how to get it working over there as well.
you must save the putty session.

---------- Post updated at 10:25 PM ---------- Previous update was at 09:27 PM ----------

Quote:
Originally Posted by varun22486
Also when i cat the file i see the UTF chars but when I do a vi..I just see numbers not the actual UTF CHars.

Any help will be appreciated.

Corona688 has been said already , probably your vi does not support it.
tyr different editors. (for ex -> vedit)

if you want force to vi working then maybe ,

1- ) Putty Translation Settings (Utf-8)
2 -) Solaris has UTF-8 for locale
what did you charmaps ?
locale -m

now you can see the UTF-8.. if is not in there then you execute
Code:
/usr/bin/uncompress /usr/lib/localedef/src/en_US.UTF-8/charmap.src.Z
/usr/bin/uncompress /usr/lib/localedef/src/en_US.UTF-8/localedef.src.Z

than try-again
Code:
locale -m
...
iso_8859_1/charmap.src
en_US.UTF-8/charmap.src
...

3 -) export LC_CTYPE="en_US.UTF-8"
(if `locale -m` output doesnt get the UTF-8 , you dont the set this locale already )

4- ) then try in the vi

regards,
ygemici
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Copying files between 2 Unix server

Is there a simple way to copy data from one server to a different server? Seems that if 2 servers are on the same network, there should be a simple way to copy between the two. Not just one file. I need to copy a whole directory with subdirectories from one server to a different one. I... (9 Replies)
Discussion started by: Docboyeee
9 Replies

2. UNIX for Dummies Questions & Answers

copying directories from NT server to Unix server (solaris 5.8)

I need to copy around 30 directories (each directory include one or more text file(s)) from NT server to Unix server at one go. For doing this what are the privillages i should have in both NT and Unix server. Please let me know which command i can use in shell prompt. TIA. (4 Replies)
Discussion started by: jhmr7
4 Replies

3. Shell Programming and Scripting

writing script in UNIX for copying files in two server

can anyone help me in writing script in UNIX for copying files in two server from the third server after checking the files in the third server and if there is anything new in the third server automatically it should be added to the rest of the two servers and if same file is existing in the two... (4 Replies)
Discussion started by: REKHA09
4 Replies

4. UNIX for Dummies Questions & Answers

Copying dir (and sub dir) file names from ftp server to txt file in diff server

Hey all, i want to copy only the file names from an ftp server (directory and all sub directory) to a text file in another server (non ftp), i.e. i want to recursively move through directories and copy only the names to a text file. any help is appreciated...thank you in advance (1 Reply)
Discussion started by: deking
1 Replies

5. Shell Programming and Scripting

Error copying files from Unix (Solaris10) to Windows Server 2003 using scp/sftp

Hi, I have generated a Public/Private Key Pair in Solaris Unix (source) server and deployed the Public key in Windows 2003(target) server .ssh directory of user profile. When i try to connect(ssh, scp, sftp) from Unix, i'm getting below error message. Sun_SSH_1.1, SSH protocols 1.5/2.0,... (0 Replies)
Discussion started by: ajaykumarb
0 Replies

6. UNIX for Dummies Questions & Answers

Copying files from Unix Server to Local

How do i copy files from Unix Server to my Local Desktop.. ANy ideas..please suggest....V Urgent. (1 Reply)
Discussion started by: win4luv
1 Replies

7. UNIX for Dummies Questions & Answers

Copying files from Unix Server to Local

How to copy files from Unix server to Local (6 Replies)
Discussion started by: win4luv
6 Replies

8. Linux

Help to Convert file from UNIX UTF-8 to Windows UTF-16

Hi, I have tried to convert a UTF-8 file to windows UTF-16 format file as below from unix machine unix2dos < testing.txt | iconv -f UTF-8 -t UTF-16 > out.txt and i am getting some chinese characters as below which l opened the converted file on windows machine. LANG=en_US.UTF-8... (3 Replies)
Discussion started by: phanidhar6039
3 Replies

9. Shell Programming and Scripting

Copying the files to Windows server from UNIX server

Hi Team, I had a requirement to write a shell script which automatically transfer the files from unix server to windows server. I can able to unix to unix using Scp command. I am not sure how to do unix to windows. I am very new on this concept. Could you please help me or guide in... (4 Replies)
Discussion started by: gvkumar25
4 Replies

10. Shell Programming and Scripting

Working with UTF char sqlplus

I have below SQL that I wasnt to run from a solaris machine using sqlplus select * from TABLE_NAME where regexp_like(field_value, 'Α|Β|Γ|Δ|Ε|Ζ|Η|Θ|Ι|Κ|Λ|Μ|Ν|Ξ|Ο|Π|Ρ|Σ|Τ|Υ|Φ|Χ|Ψ|Ω|α|β|γ|δ|ε|ζ|η|θ|ι|κ|λ|μ|ν|ξ|ο|π|ρ|σ|τ|υ|φ|χ|ψ|ω'); When I cat the file UTF char shows perfect however when i run... (1 Reply)
Discussion started by: varun22486
1 Replies
LOCALEDEF(1)						      General Commands Manual						      LOCALEDEF(1)

NAME
localedef - compile locale definition files SYNOPSIS
localedef [options] outputpath localedef --list-archive [options] localedef --delete-from-archive [options] localename ... localedef --add-to-archive [options] compiledpath localedef --version localedef --help localedef --usage DESCRIPTION
The localedef program reads the indicated charmap and input files, compiles them to a binary form quickly usable by the locale(7) functions in the C library, and places the output in outputpath. If outputpath contains a slash character ('/'), it is directly the name of the output directory. In this case, there is a separate output file for each locale category (LC_CTIME, LC_NUMERIC, and so on). Otherwise, if the --no-archive option is used, outputpath is the name of a subdirectory in /usr/lib/locale where per-category compiled files are placed. Otherwise, outputpath is the name of a locale and the compiled locale data is added to the archive file /usr/lib/locale/locale-archive. In any case, localedef aborts if the directory in which it tries to write locale files has not already been created. If no charmapfile is given, the value POSIX is used by default. If no inputfile is given, or if it is given as a dash (-), localedef reads from standard input. OPTIONS
Most options can have either short or long forms. If multiple short options are used, they can be combined in one word (for example, -cv is identical to -c -v). If a short option takes an argument, the argument can be given separately as the next word (-f foo), or it can be written together with the option letter (-ffoo). If a long option takes an argument, the argument can be given separately as the next word, or it can be written as option=argument (--charmap=foo). Operation selection options A few options direct localedef to do something else than compile locale definitions. Only one of these should be used at a time. --delete-from-archive Delete the named locales from the locale archive file. --list-archive List the locales contained in the locale archive file. --add-to-archive Add the compiledpath directories to the locale archive file. The directories should have been created by previous runs of lo- caledef, using --no-archive. Other options Some of the following options are only sensible for some operations; hopefully it is self-evident which ones. -f charmapfile, --charmap=charmapfile Specify the file that defines the symbolic character names that are used by the input file. If the file is in the default directory for character maps, it is not necessary to specify the full pathname. This default directory is printed by localedef --help. -i inputfile, --inputfile=inputfile Specify the locale definition file to compile. If inputfile is not absolute, localedef will also look in the directories specified by the environment variable I18NPATH and in the default directory for locale definition files. This default directory is printed by localedef --help. -u repertoirefile, --repertoire-map=repertoirefile Read mappings from symbolic names to Unicode UCS4 values from repertoirefile. -A aliasfile, --alias-file=aliasfile Use aliasfile to look up aliases for locale names. There is no default aliases file. --prefix=pathname Set prefix to be prepended to the full archive pathname. By default, the prefix is empty. Setting the prefix to foo, the archive would be placed in foo/usr/lib/locale/locale-archive. -c, --force Write the output files even if warnings were generated about the input file. --old-style Create old-style tables. -v, --verbose Generate extra warnings about errors that are normally ignored. --quiet Suppress all notifications and warnings, and report only fatal errors. --posix Conform strictly to POSIX. Implies --verbose. This option currently has no other effect. Posix conformance is assumed if the en- vironment variable POSIXLY_CORRECT is set. --replace Replace a locale in the locale archive file. Without this option, if the locale is in the archive file already, an error occurs. --no-archive Do not use the locale archive file, instead create outputpath as a subdirectory in the same directory as the locale archive file, and create separate output files for locale categories in it. --help Print a usage summary and exit. Also prints the default paths used by localedef. --usage Print a short usage summary and exit. -V, --version Print the version number, license, and disclaimer of warranty for localedef. ENVIRONMENT
POSIXLY_CORRECT The --posix flag is assumed if this environment variable is set. I18NPATH A colon separated list of default directories for locale definition files. FILES
/usr/share/i18n/charmaps Usual default charmap path. /usr/share/i18n/locales Usual default path for locale source files. /usr/share/i18n/repertoiremaps Usual default repertoire map path. /usr/lib/locale/locale-archive Usual default locale archive location. outputpath/LC_COLLATE One of the output files. It describes the rules for comparing strings in the locale's alphabet. outputpath/LC_CTYPE One of the output files. It contains information about character cases and case conversions for the locale. outputpath/LC_MONETARY One of the output files. It describes the way monetary values should be formatted in the locale. outputpath/LC_MESSAGES/SYS_LC_MESSAGES One of the output files. It contains information about the language messages should be printed in, and what an affirmative or nega- tive answer looks like. outputpath/LC_NUMERIC One of the output files. It describes the rules for formatting numbers in the locale. outputpath/LC_TIME One of the output files. It describes the rules for formatting times and dates in the locale. outputpath/LC_PAPER One of the output files. It describes the default paper size in the locale. outputpath/LC_NAME One of the output files. It describes the rules for formatting names in the locale. outputpath/LC_ADDRESS One of the output files. It describes the rules for formatting addresses, and other location information in the locale. outputpath/LC_TELEPHONE One of the output files. It describes the rules for formatting telephone numbers in the locale. outputpath/LC_MEASUREMENT One of the output files. It describes the rules for measurement in the locale, e.g. Metric or other units. outputpath/LC_IDENTIFICATION One of the output files. It identifies the elements within the locale. EXAMPLES
Compile the locale files for Finnish in the UTF-8 character set and add it to the default locale archive with the name fi_FI.UTF-8: localedef -f UTF-8 -i fi_FI fi_FI.UTF-8 The same, but generate files into the current directory (note that the last argument must then contain a slash): localedef -f UTF-8 -i fi_FI ./ SEE ALSO
locale(5), locale(7), locale(1) AUTHOR
The program was written by Ulrich Drepper. This manual page was written by Richard Braakman <dark@xs4all.nl> on behalf of the Debian GNU/Linux Project and anyone else who wants it. It was amended by Alastair McKinstry <mckinstry@computer.org> to explain new ISO 14652 elements, and amended further by Lars Wirzenius <liw@iki.fi> to document new functionality (as of GNU C library 2.3.5). The manpage is not supported by the GNU libc maintainers and may be out of date. STANDARDS
This program conforms to the POSIX standard P1003.2 May 20, 2005 LOCALEDEF(1)
All times are GMT -4. The time now is 07:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy