Converting Unicode in File

I am using an event script (AftExportToDat) to create a file to clear data in the target system. When I open the .dat file (in Notepad) it contains characters like 吀䔀䴀倀㬀㈀ ㄀㄀㬀倀 㘀㬀夀吀䐀㬀䠀䔀开䄀唀匀吀刀䄀䰀䤀䄀㬀㰀䔀渀琀椀琀礀 . I believe it is due to the fact that FDM v11.1.1.3 saves files as Unicode. I have tried different formats such as 0,-1,-2, and they are not working. Is there another way to format the file?
Function AppendDataFile(sFilePath1, sFilePath2)
Dim filesys
Dim sBuf
Dim oFile1
Dim oFile2
AppendDataFile = ""
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set filesys = CreateObject("Scripting.FileSystemObject")
Set oFile1 = filesys.OpenTextFile(sFilePath1, ForAppending, True)
If err > 0 Then AppendDataFile = err.Description
Set oFile2 = filesys.OpenTextFile(sFilePath2, ForReading, False)
If err > 0 Then AppendDataFile = err.Description
Do While Not oFile2.AtEndOfStream
sBuf = oFile2.ReadLine
If UCase(Left(sBuf, 5)) <> "!DATA" Then
oFile1.WriteLine(sBuf)
End If

#1
OpenTextFile("c:\testfile.txt", ForAppending,0)
Should open the output file in ASCII.
#2
Looking at your output, it would appear to me the issue is that the source data is coming in as ASCII and it is being interpreted as Unicode. I don't think the file you are writing to is the problem, rather wherever the data is coming in from.
If the situation was reversed (i.e. you started with Unicode and wrote it as ASCII) it would still be readable.
This is a test (in Unicode) would look like T h i s i s a t e s t (in ASCII)
This is a test (in ASCII) would like like a bunch of Japanese characters (in Unicode)
Why?
ASCII characters are represented as one byte while Unicode are represented as two bytes.
T in ASCII is 54 (hex)
T in Unicode is 54 00 (hex)
If you interpret a Unicode data stream as ASCII, each byte in the stream would be treated as its own character. 54 is still T. 00 is a non printable value (null) which would most likely be shown as an empty space.
If you interpret an ASCII data stream as Unicode, you would need to grab two bytes to make one character. Using the example string 'This is a test', the two bytes grabbed would be 54 (T) and 68 (h). The Unicode display character for 5468 is Japanese .....

Similar Messages

  • LSMW: Codepage conversion error with a Unicode data file

    Hi all,
    I am currently developing a LSMW upload program which has to use a Unicode data file. The underlying system/target system is NOT a Unicode system. The data file also contains non-Latin2 characters.
    In the step "Specify Files", I have specified my Unicode data file and specified the codepage type "4110 - Unicode UTF-8".
    In the step "Read Data", then I get the runtime error "CONVT_CODEPAGE", exception "CX_SY_CONVERSION_CODEPAGE".
    I would expect that all non-Unicode characters are automatically transformed to "#", but the conversion progam breaks. The character transformation to "#" would be fine.
    I am really wondering why, at first, I am able to specify the Unicode codepage type, but then, the file cannot be converted correctly.
    What do I make wrong, what can I do to avoid the error?
    Thanks a lot in advance for helping me out...
    Regards,
    Klaus

    Hello,
    You need convert the file with the format UTF-8. In notepad you can choose this option.
    Regards,
    Oscar.

  • Unicode huge file conversion problem

    I use the command in Unix "<b>sapiconv -f 4110 -t 8600 -o <source file name> <destination file name></b>" calling by ABAP command  "CALL 'SYSTEM' ID 'COMMAND'  "   to convert non-unicode source file to unicode destination file in code page 8600 (Thai language). For the small size source file, It has no problem, but for the huge size source file (27MB - the file was extracted and created by OPEN DATASET from asset master data about 95000 records), it has problem.  There are only about 1300 Records (about 200k) in destination file and <b>the remain records are missing!?!?</b> And every time I run the program, It still has certain result.
    What can I do for this case? or the command 'sapiconv' has the size limitation for unicode file conversion? or which additional parameter should I use?
    Thank you in advance.
    David

    Hello,
    You  can use this function module
    CALL FUNCTION 'ARCHIVOBJECT_GET_CLIENT'
              EXPORTING
                ARCHIV_DOC_ID               =   V_ARCDOCID
                ARCHIV_ID                        =   V_ARCHIVID
                PATH                                 =   V_PATH
    *            DOC_TYPE                       =   'TXT '
    *         IMPORTING
    *            REPATH                           =
    *            COUNT                             =
    *            FILE_NAMES                    =
             EXCEPTIONS
               ERROR_ARCHIV                = 1
               ERROR_COMMUNICATIONTABLE       = 2
               ERROR_KERNEL                = 3
               ERROR_HTTP                     = 4
               OTHERS                             = 5.       
    I think it will help to you,
    Anil.

  • After Effects error: could not convert Unicode characters. (23 :: 46)

    Hello,
    I'm getting the following error message:
    After Effects error: could not convert Unicode characters. (23 :: 46)
    I have yet to find an answer that works to resolve this problem. I'm using CS6 on an HP Z220 on Windows 7.
    Thanks in advance.

    So I solved the problem. A little history for this situation: I created a new AE project and while attempting to import a file received the error message:  After Effects error: could not convert Unicode characters. (23 :: 46)
    I then tried to import a Vanishing Point which broken the spell on the error message and allowed the menu to select a vanishing point to appear. I closed out of that and was then able to import files.

  • UNICODE data files with SQLLDR

    how can i load UNICODE data files with SQLLDR.
    my Oracle instance is on UNIX with NLS_CHARACTERSET WE8ISO8859P1.
    I have .dat files extracted from SQL Server using bcp utility with -w option.
    When i use -c option i'm not getting the european characters correctly like the a and e with 2 dots on top....
    when i load UNICODE (-w) file with CHARACTERSET UTF8 in my control file, it doesnt go thru. Any solution for this ? Thanks !

    I just created a unicode textfile on windows with some westeuropean characters and imported it into we8iso8859p1 database on linux using controlfile parameter CHARACTERSET UTF16.
    They got all properly converted.
    As Justin mentioned, unicode on windows means generally UTF16 Little Endian.
    Best regards
    Maxim

  • AE error: Could not convert Unicode Characters

    Hey guys,
    I purchased the Video Copliot Action essentials 2 (720p). Whenever I try to import or drag and drop the pre-keyed clips (quicktime .mov format) into AE, I get the After Effects error: could not convert Unicode Characters (23 ::46) . I found an article online that said to make changes to the text in whatever Im importing, but umm it's a video, not text.
    I am using AE cs5.
    I can import the clips just fine into Premier Pro and export them oddly enough in Quicktime format just fine, however I lose the transperency "pre-keyed" , that's somehow embedded into the original video, therefore I now have a video of smoke, but with a non removable black background.
    Please help! thanks!

    Hey man i made an account just to reply to this, i had the same error come up while i was importing video files so i had a look around and found that it had something to do with the language/coding not being recognised, so i looked closer into the footage and tried different method of importing the file and later realised that after effects didnt recognise some of the characters in the file path way, the original folder was created using a macbook, windows recognises the language but after effects didnt, so i moved the file to my desktop and tried to import it again and presto it worked fine, you may not have the same problem but i thought just incase you do, you should try moving the file,
    if not heres a thread for the error:
    http://helpx.adobe.com/after-effects/kb/error-could-convert-unicode-characters.html
    hope that could be of some help.
    Zai

  • " could not convert Unicode characters (23::46) "

    I am suddently received an error message: " could not convert Unicode characters (23::46) " on my OS X version 10.9, when I trying to open a template. I have no problem to open the file on my friend's pc tho..  Any suggestion how to fix it greatly appreciated.
    Thanks,
    Andy,

    There is some character in the file name or the path name for the file that After Effects doesn't recognize. What is the full path and file name of this project?

  • After Effects error: could not convert Unicode characters. (23::46) CS6

    Hello I just created a project in AE CC and wanted to save also a version for CS6.
    All went ok but when I tried to open the project in CS6 I received the following error:
    "After Effects error: could not convert Unicode characters. (23::46)"
    Does anyone know what that means and how to fix it?

    After Effects CC is much, much better at handling characters that are outside of the character set used by the OS at its current language settings. So, file names and paths (and other strings) that work fine in After Effects CC and later may fail with earlier versions.
    For example, if you are running your OS and applications in English and have Chinese characters in your file names, After Effects CS6 and earlier will fail, but After Effects CC and earlier will succeed.

  • Generate Unicode text file

    Hi All,
    I am trying to create a unicode text file using OPEN DATASET which is to be fed to MDM for further process. I tried using the follow statement but no use,
    OPEN DATASET p_afile FOR OUTPUT IN LEGACY TEXT MODE
    CODE PAGE '1100' IGNORING CONVERSION ERRORS.
    After generating a file I try to save it manually using excel and it gets converted without any issues. But the requirement is to generate a unicode txt file as like below in excel,
    Any leads?

    I even tried the usual way as below but not able to get the file,
    OPEN DATASET p_afile FOR APPENDING IN TEXT MODE
    ENCODING UTF-8.

  • ALL MY DESKTOP APPS CONVERTED TO PDF FILES.

    After sending an urgent email attachment in Adobe PDF to Government Offcom, all my Desktop applications in windows 7 64 bit have been converted to PDF files and cannot be opened.   The attachment used was sent to me by my Secretary remotely using an old MAC.
    I can return my laptop to normal operation by un installing my Adobe Reader 11 app, but the problem returns when I re Download Adobe Reader
    11 again.     After discussing this with Adobe Technical in London they advised me to raise this issue with your Adjudicators in this Forum. 
    Please assist asap as this is very urgent right now for several genuine reasons.
    Many thanks.   Derek Horder.

    See if anything in here helps: https://helpx.adobe.com/acrobat/kb/application-file-icons-change-acrobat.html

  • How can I convert an audio file (speech) into a text?

    Hello everybody!
      Can someone explain how I can convert a garageband file (voice speech) into a text? My Mac is a Mac OS X 10.5.8 version, so I don't have programs such as mountain Lion. I thought to use googlevoice. Is this option available? If yes, how can I use it?
    Thanks.

    Hello, I only find google voice available for Abdroid!?
    http://www.ehow.com/info_10033225_google-voice-system-requirements-android.html
    Some possibilitities, not sure if they have 10.5.8 compatble versions anymore...
    http://atmac.org/speech-to-text-dictation-software-for-os-x
    Some reviews of later Dragon Speak...
    http://www.finetunedmac.com/forums/ubbthreads.php?ubb=showflat&Number=22962

  • While saving a file, I have converted all my files to Pdf.  The only way to restore previous is to delete Adobe.  Does anyone have a soution?

    While saving a file, I have converted all my files to Pdf.  This made everything inaccessible, even Explorer.  I had to delete Adobe to get back to some of the previous files.  I tried to restore system to previous, but I kept getting a pop up message that said I did not have enough shadow space.  Does anyone have a solution?  Greatly appreciate your help.

    Application, file icons change to Acrobat/Reader icon

  • Is it wise to keep the Nikon camera files "DSC's"  after downloading them and converting to DNG files via Adobe converter for lightroom use. In other words do the DNG files have all the raw data I would ever need in processing or should I save the camera'

    Is it wise to keep the Nikon camera files "DSC's"  after downloading them and converting to DNG files via Adobe converter for lightroom use. In other words do the DNG files have all the raw data I would ever need in processing or should I save the camera's DSC files?

    DNG files do not contain some metadata supplied by the camera, which can be used by the manufacturer's software. Thus, if you don't keep the original Raw photo, you will lose this information.
    If your 1000% sure you're never going to use the manufacturer's software, then this isn't a problem. But who can be sure what software you will be using 10 years from now?

  • Looking for help with converting a ppsx file to a video format such as .mov or mp4

    Hi All,  I am looking for conversion software that will allow me to convert a ppsx file to a video file on OS10.5.8. 

    Hi Klaus1, Thanks for your response.  I can open and view the file without difficulty.  My issue is getting into a video format that I can upload to a Website for client viewing.  All the conersion products I can find are for a newer OS then 10.5.8.  I am working on a deadline of midnight tonight-and cannot upgrade that quickly.  So What I need is a conversion program that will still run on my OS

  • Which is the best software to convert the video files for itouch?

    I got a 3rd gen itouch. Is there any software that helps to convert the video files. so I can sync those files to my itouch. " Handbrake " used to work pretty good. but now i still can convert the video files to m4v format but itunes doesn't allow me to put those files in. Please Help!

    You may have different menu options than Half bit Bit Ah. The support page on how to do it is at https://support.apple.com/kb/TS1497. In part it says:
    If you did not purchase videos from the iTunes Store, they are may not be in a format that you can play on your iPhone/iPod. In many cases, you can convert them to the correct format using iTunes or QuickTime.
    * Using iTunes: Select a video and choose Advanced > Create iPod or iPhone Version
    * Using Mac OS X v10.6: Open the video in QuickTime Player and choose Share > iTunes and then select the iPhone & iPod option.
    Hope that helps!

Maybe you are looking for

  • Itunes skipps when on the internet

    My itunes skips while I am on the internet. Sometimes it skipps several times a song. I rewind the song just to see if it skipps in the same place again and it does not. This means that the song is ok, but when I am working on the internet, for some

  • Macbook pro 13 inch 2011

    I have got this problem my display has  just from nowhere black spots that have appear from the bottom of the screen please help me

  • Magic Mouse Left Click Problem

    I got a Magic Mouse for Christmas this morning and set up with my Macbook Pro. The setup went quickly and well. I was able to move the cursor around my screen with the Magic Mouse. However, the click buttons don't work. I have tried left and right cl

  • AIR App Made in Flash AS3 Installer Error

    I created a desktop AIR 2.6 app using AS3 in Flash 5.5.  After I publish it and try to install it I get this error: The app works great when I just run the swfs.  I have published apps before using the same software and haven't had any problems.  Thi

  • HT4623 How do I restore texts that I deleted

    How do I restore text Messages that I deleted from my phone.