[Asterisk-Users] Editing Asterisk config files with WORD Pad

trixter aka Bret McDanel trixter at 0xdecafbad.com
Tue Nov 15 10:35:06 MST 2005


On Tue, 2005-11-15 at 11:56 -0500, Jason Pyeron wrote:
> a unicode document comes in two flavors UTF8 and UCS2 in windows UTF8 
> "may" work, but UCS2 cannot work, as it is 2 bytes per character.
> 
> UTF8 will not work if wordpad puts a byte order sentinal at the begining 
> or if you use any characters above 0x7e (or 0x7f?)
> 
> use ascii (DOS format) to save your files, but beware of line ending 
> problems...
> 

dos2unix (if installed) can fix  the line termination problem..

Dos/win likes to use \r\n (^M^J) to terminate.  Unix likes just \n, and
traditional mac likes just \r.  

There is a something you can do if dos2unix isnt installed using tr,
which will do the same thing.  
cat file | tr -d \\r > file.new ; mv file.new file

Note if you are doing this on a mac that does line terminators as just
\r you need to replace that with \n.  This can be accomplished by:
cat file | tr \\r \\n > file.new ; mv file.new file


-- 
Trixter http://www.0xdecafbad.com     Bret McDanel
UK +44 870 340 4605   Germany +49 801 777 555 3402
US +1 360 207 0479 or +1 516 687 5200
FreeWorldDialup: 635378
http://www.sacaug.org/ Sacramento Asterisk Users Group
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20051115/510a4402/attachment.pgp


More information about the asterisk-users mailing list