I will be reading a file (file_in) with name & address and a word that I may need to convert. Running unix on a pc, this would be easy. But on my Solaris I am not getting the desired results.
If my file_in contains:
and my
conversion file is:
and I want to create:
which after a whole bunch more programming is ftp'd to my pc network for printing.
I know how to figure this out with awk, etc.. My problem is when I ftp that conversion file to my unix, I end up with wrong characters. In fact, I end up with something like "V\202\hicle" when I vi the file. (Which is correct since the 202 in octal is the e with accent.)
But, this \202 representation garbles during processing and I end up with strange data at the end.
So, I am looking for tricks or hints for my Solaris unix (bash or ksh) to deal with extended characters.
Thanks in advance.
Hello Again,
Those that have noticed my earlier posts will know that I have succesfully installed Solaris 8 onto my pc. I haven't been able to get x-server working (i think it doesn't like my video card) though I've been able to log into root (with a bit of help from unix forums :o ) and have... (2 Replies)
Dear frnz
I face a weird issue with p275 workstation with Aix 5.1
After booting the workstation i am getting dt login screen and i am not able to key in user name and passwd .The mouse pointer is moving but the mouse buttons doesnt work.
i am able to login through rsh to the machine... (1 Reply)
Hi Guys,
I am using db2 load to load from a csv file to a table.
Problem is that extended characters ™,®,é,º do not get loaded correctly.
Its a UTF 8 format csv and i am using codepage=1208 for the load.
Does anybody have an idea on this?
Thanks (2 Replies)
Hello,
I hope I put this in the right forum...
I searched for similar threads, but I couldn't find any that seem to deal with the problem I am having.
My workplace is using (among other Solaris-machines) Dell Dimension T3500 as workstations (running Solaris 10 X86 10/09 u8,... (0 Replies)
Hello,
Just got a refurbished Pseries when I boot the machine , everything is okay, that is no attention light and panel shows
01 B N
but there is nothing on the display ( monitor / console ) which is plugged into the video card port of pseries. The display is empty....
The keyboard... (3 Replies)
Hi,
Is there a way to identify the lines in a file having extended ascii characters and display the same?
For instance I have a file abc.txt having below data
aaa|bbb|111|This is first line
aaa|bbb|222|This is secõnd line
aaa|bbb|333|This is third line
aaa|bbb|444|This is foùrth line... (3 Replies)
We are getting extended Ascii characters in the input file and my requirement is to search and replace them with a space. I am using the following command
LANG=C sed -e 's// /g'
It is doing a good job, but in some cases it is replacing the extended characters with two spaces. So my input... (12 Replies)
Hi,
I want to read extended ASCII characters from keyboard using c language on unix/linux. How to read extended characters from keyboard or by copy-paste in terminal irrespective of locale set in the system. I want to read the input characters from keyboard, store it in an array or some local... (3 Replies)
I am working with a log file that I am trying to clean up by removing non-English ASCII characters. I am using Bash via Cygwin on Windows.
Before I start I set:
export LC_ALL=C
I clean it up by removing all non-English ASCII characters with the following command;
grep -v $''... (4 Replies)
Discussion started by: lewk
4 Replies
LEARN ABOUT DEBIAN
sub::exporter::formethods
Sub::Exporter::ForMethods(3pm) User Contributed Perl Documentation Sub::Exporter::ForMethods(3pm)NAME
Sub::Exporter::ForMethods - helper routines for using Sub::Exporter to build methods
VERSION
version 0.091970
SYNOPSIS
In an exporting library:
package Method::Builder;
use Sub::Exporter::ForMethods qw(method_installer);
use Sub::Exporter -setup => {
exports => [ method => '_method_generator' ],
installer => method_installer,
};
sub _method_generator {
my ($self, $name, $arg, $col) = @_;
return sub { ... };
};
In an importing library:
package Vehicle::Autobot;
use Method::Builder method => { -as => 'transform' };
DESCRIPTION
The synopsis section, above, looks almost indistinguishable from any other use of Sub::Exporter, apart from the use of "method_installer".
It is nearly indistinguishable in behavior, too. The only change is that subroutines exported from Method::Builder into named slots in
Vehicle::Autobot will be wrapped in a subroutine called "Vehicle::Autobot::transform". This will insert a named frame into stack traces to
aid in debugging.
More importantly (for the author, anyway), they will not be removed by namespace::autoclean. This makes the following code work:
package MyLibrary;
use Math::Trig qw(tan); # uses Exporter.pm
use String::Truncate qw(trunc); # uses Sub::Exporter's defaults
use Sub::Exporter::ForMethods qw(method_installer);
use Mixin::Linewise { installer => method_installer }, qw(read_file);
use namespace::autoclean;
...
1;
After MyLibrary is compiled, "namespace::autoclean" will remove "tan" and "trunc" as foreign contaminants, but will leave "read_file" in
place. It will also remove "method_installer", an added win.
EXPORTS
Sub::Exporter::ForMethods offers only one routine for export, and it may also be called by its full package name:
method_installer
This routine returns an installer suitable for use as the "installer" argument to Sub::Exporter. It updates the "@to_export" argument to
wrap all code that will be installed by name in a named subroutine, then passes control to the default Sub::Exporter installer.
AUTHOR
Ricardo Signes <rjbs@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2009 by Ricardo Signes.
This is free software; you can redistribute it and/or modify it under the same terms as perl itself.
perl v5.10.1 2009-07-16 Sub::Exporter::ForMethods(3pm)