XML output file with Control M Characters

Hi,
I am using JDOM API 1.0 on Solaris platform.
Using the XMLOuputter I write the XML data to a file. But the XML file contains Control-M characters at the end of each line..like
<User>^M
<Name>Satish</Name>^M
<id>12567</id>^M
</User>^M
File f = new File(path,Constants.USER_XML);
Document doc = getDocument();
XMLOutputter out = new XMLOutputter();
out.setFormat(Format.getPrettyFormat());
Format outFormat = out.getFormat();
outFormat.setLineSeparator(System.getProperty("line.separator"));
outFormat.setIndent(" ");
try{
FileWriter fw = new FileWriter(f);
out.output(doc,fw);
} catch(IOException iox) {}I am not writing the Control-M characters. Also I am using the default encoding which is UTF-8. So how to avoid the control characters. Thanks in advance.
Regards,
Satish

Those are carriage-return (CR) characters. I don't know anything about the classes you are using but I would suggest you let the software decide what line endings it is going to use (the XML default is line-feed (LF) only) instead of telling it. Just a guess.
It's also possible that those CRs were in your input document and you are just copying them to the output document. XML parsers are supposed to normalize those characters to only LF but perhaps your parser isn't doing that. Just another guess.

Similar Messages

  • Want attach the XML data file with layout template in Oracle 10g

    Hi All,
    I need a help from you genius guys.
    I am genrating reports in BI with xml the procedure which I am following is as below.
    1. generating XML from the RDF
    2. creating a template in .rtf format
    3.after that loading the xml to the template then getting the required report.
    This all is doing through the given buttons
    But now my requirement is to create the gui from user can select the report and get the desire output file so how we would be able to attach the XML data file with layout template in Oracle 10g.
    If you require more detail please let me knnow.
    Thanks,
    Harry

    I am not using Oracle apps.
    I am using oracle 10g reports and I get something in it like one patch I downloded and one java code is having which creates the batch file ...still I am working on it ..
    If you will get some please share so that it will be helpful.
    Thanks,
    Harry

  • XML Output  File using PLSQL

    I like to generate an XML output file using the PLSQL. Can any one help with an example (using EMPand DEPT). I tried the forum but seems confusing to me...
    This is URGENT so please rush!

    Please refer to the following post:
    page 0 security: authorization scheme not applied to other pages

  • How to calculate number of data records in a XML output file

    Hi,
    After generating a XML output file from Oracle Reports, I want to calculate number of records in the XML file. Is it possible? Specifically, I want to calculate number of records for a group variable ( organization_id, which I use for bursting).
    Thanks for the help.

    Thanks BIPuser. It is useful for me.
    I can use this xsl function within the template. However, I'm also looking to print this in the concurrent request log file. So, outside of rtf template, id there any PL/SQL based XML functions I can use to count the number of records.
    Thanks.

  • Firefox doesn't reconvert special characters in the file names when download a file with any special characters in the file name

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [/questions/815207]</blockquote><br>
    if i try to download a file with any special characters in file name (e.g. File_Name.pdf), it doesn't reconvert them from the "sanitize url" process and download the file an incorrect name (e.g. File%5FName.pdf).
    This is really annoying.
    Thank you for your patient

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    * [[Troubleshooting extensions and themes]]

  • I need to create a MIDI file with control cues only. Is that possible?

    I need to create a stand alone MIDI file with control cues to control a non-musical device which does understand these files.
    Must I create a virtual device in MIDI Setup for Logic to talk to?
    Must I create notes in order to create regions that will export?
    Is it possible to do this in MIDI channel 0?
    Is LogicPro the tool to use to do this?
    The maker of the device uses ProTools to create his MIDI files.
    I use a MacBook Pro with OSX 10.10.2 running LogicPro 10.1.1.
    Thanks!
    Doug

    No you cannot trigger a paragraph style with a character or character style.
    But you can have a Apply Next Character Style
    Accountable for: <paragraph style name "Heading 1">
    >> Bullet1 <paragraph style name "Bullet">
    In the Heading 1 style go to "Next Style" under "General"
    and choose "Bullet"
    The select from "Accountable for:" to the last bullet in the list
    Right Click on the Heading 1 style and go to Apply Heading 1 and Next Style.
    http://creativebits.org/indesign/taking_advantage_of_indesign_s_next_style
    http://indesignsecrets.com/where-is-apply-__-then-next-style.php

  • ** The XML output file is unreadable in SAP ECC 6.0 (Working fine in 4.6c)

    Hi Friends,
    I am working in SAP Technical upgrade Project from 4.6C to SAP ECC 6.0. In 4.6c one Z program is there, the output of Z program is to generate output XML file in the application Server. We checked and downloaded that the output file is readable and the XML is valid.
    When we run the same program in ECC 6.0. (after unicode check & changes done), the output xml file is generated and it is in unreadable form. (XML contains some machine characters). When we open the XML in Altova Spy, it shows the error XML is invalid. The erorr is 'character #x3F3C is grammatically unexpected'. 
    In 4.6c, they used the encoding <?xml version="1.0" encoding="ISO-8859-1" ?> . We changed the encoding to UTF-8 in ECC 6.0 since we are doing unicode conversion.  (
    <?xml version="1.0" encoding="UTF-8" ?> ). After this change also, the output file is not generated correctly. It is unreadable form. (Some Machine Characters).
    Friends, What could be the problem ? . Can you help me to identify this problem.
    Kind regards,
    Jegathees P.

    I troubleshooted that, the reason is that conversion of X to C (Hexadecimal to C) in the ASSIGN statement is not working correctly in ECC 6.0. Then, we replaced the code with our custom Function Module to convert xstring to string. After this, we got the XML correctly, readable and well-formed XML.

  • ns0 Prefix in XML output file

    Dear Gurus,
    I am working on a scenario where vendor master is triggered from  SAP-XI--FTP.
    when i am posting the vendor master on FTP.. i am getting
    the xml output with prefix as below
    <ns0:VENDORID>0000100000</ns0:VENDORID>at each element in vendor master xml file.
    Instead of  <VENDORID>0000100000</VENDORID>
    could anyone tell how to fix this prefix at each level.
    Does i need to add any module in file receiver adapter..or any patch i need to apply ..
    we are on SP9 PI 7.0
    Kind Regards,
    Vijay

    Hi,
    I tryed as per blog earlier ..it is not working
    i am using file receiver adapter...any other solution to fix this.
    Regards,
    Vijay

  • XML Data File With Namespace

    Hi,
    I'm trying to create a template with the below xml data file. However, I'm struggling to get any of the field to show up in the report output. Does any have the same issue?
    <ns0:getCommunityPhaseMasterResponseElement xsi:type="ns0:CVO_CommunityPhaseMaster" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://oracle.e1.bssv.JP57M011/types/">
    <ns0:e1MessageList/>
    <ns0:routingCode xsi:nil="1"/>
    <ns0:integrationErrors xsi:type="ns0:CVO_IntegrationErrorsList">
    <ns0:transmissionAck xsi:type="ns0:CVO_TransmissionAck">
    <ns0:transmissionStatus>0</ns0:transmissionStatus>
    <ns0:transmissionId xsi:nil="1"/>
    </ns0:transmissionAck>
    <ns0:transmissionHeader xsi:type="ns0:CVO_TransmissionHeader">
    <ns0:routingCode xsi:nil="1"/>
    <ns0:originatingSystem xsi:nil="1"/>
    <ns0:transmissionUser xsi:nil="1"/>
    <ns0:transmissionDate xsi:nil="1"/>
    </ns0:transmissionHeader>
    </ns0:integrationErrors>
    <ns0:communityPhaseResult xsi:type="ns0:CVO_CommunityPhaseResult">
    <ns0:warrantyBusinessUnit> 11019999</ns0:warrantyBusinessUnit>
    <ns0:statusCode1>1</ns0:statusCode1>
    <ns0:averageOtherRevenue05>0.00</ns0:averageOtherRevenue05>
    <ns0:amountUserDefinedAmount06>0.00</ns0:amountUserDefinedAmount06>
    <ns0:dateCreated>2003-01-08T00:00:00.000-08:00</ns0:dateCreated>
    <ns0:planMasterProductType_Desc>Single Family Detached </ns0:planMasterProductType_Desc>
    <ns0:numberOfStartedLots>0</ns0:numberOfStartedLots>
    <ns0:amountUserDefinedAmount03>0.00</ns0:amountUserDefinedAmount03>
    <ns0:averageCostPercent5>0.00</ns0:averageCostPercent5>
    <ns0:addressNumberCommunity12>0</ns0:addressNumberCommunity12>
    <ns0:averageOtherRevenue04>10.00</ns0:averageOtherRevenue04>
    <ns0:addressNumberSalesOffice>0</ns0:addressNumberSalesOffice>
    <ns0:averageCostPercent3>0.00</ns0:averageCostPercent3>
    <ns0:addressNumberUserReserved02>0</ns0:addressNumberUserReserved02>
    <ns0:amountUserDefinedAmount10>0.0000</ns0:amountUserDefinedAmount10>
    <ns0:addressNumberCommunity07>1000571</ns0:addressNumberCommunity07>
    <ns0:statusCode2> </ns0:statusCode2>
    <ns0:timeCreated>142446</ns0:timeCreated>
    <ns0:statusCode3> </ns0:statusCode3>
    <ns0:addressNumberCommunity10>120006</ns0:addressNumberCommunity10>
    <ns0:homeBuilderRuleTypeConstruction_Desc>Detailed Construction. </ns0:homeBuilderRuleTypeConstruction_Desc>
    <ns0:planMasterProductType>SFD</ns0:planMasterProductType>
    <ns0:addressNumberCommunity05>1000643</ns0:addressNumberCommunity05>
    <ns0:numberOfSoldLots>0</ns0:numberOfSoldLots>
    <ns0:workStationId>T60-JVL </ns0:workStationId>
    <ns0:addressNumberCommunity02>120005</ns0:addressNumberCommunity02>
    <ns0:addressNumberUserReserved03>0</ns0:addressNumberUserReserved03>
    <ns0:addressNumberCommunity14>0</ns0:addressNumberCommunity14>
    <ns0:statusCode4> </ns0:statusCode4>
    <ns0:homeBuilderRuleTypeSales>100</ns0:homeBuilderRuleTypeSales>
    <ns0:addressNumberCommunity06>1000580</ns0:addressNumberCommunity06>
    <ns0:numberOfPhases>0</ns0:numberOfPhases>
    <ns0:addressNumberCommunity17>0</ns0:addressNumberCommunity17>
    <ns0:originalWorkStationId>TP23-GLENN</ns0:originalWorkStationId>
    <ns0:userDate7 xsi:nil="1"/>
    <ns0:addressNumberCommunity13>0</ns0:addressNumberCommunity13>
    <ns0:averageOtherCost04>5000.00</ns0:averageOtherCost04>
    <ns0:addressNumberUserReserved05>0</ns0:addressNumberUserReserved05>
    <ns0:amountUserDefinedAmount02>0.00</ns0:amountUserDefinedAmount02>
    <ns0:averageOtherCost03>10000.00</ns0:averageOtherCost03>
    <ns0:addressNumberConstructionOffice>0</ns0:addressNumberConstructionOffice>
    <ns0:amountUserDefinedAmount08>0.00</ns0:amountUserDefinedAmount08>
    <ns0:createdByUser>GLENN </ns0:createdByUser>
    <ns0:community> 11010000</ns0:community>
    <ns0:planMasterProductGroup> </ns0:planMasterProductGroup>
    <ns0:amountUserDefinedAmount09>0.00</ns0:amountUserDefinedAmount09>
    <ns0:userDate6 xsi:nil="1"/>
    <ns0:addressNumberCommunity16>0</ns0:addressNumberCommunity16>
    <ns0:addressNumberCommunity04>120002</ns0:addressNumberCommunity04>
    <ns0:addressNumberCommunity15>0</ns0:addressNumberCommunity15>
    <ns0:homeBuilderArea>110</ns0:homeBuilderArea>
    <ns0:numberOfLots>52</ns0:numberOfLots>
    <ns0:constructionSequence>048</ns0:constructionSequence>
    <ns0:incomeStatementBusinessUnit> 110110</ns0:incomeStatementBusinessUnit>
    <ns0:statusCode5> </ns0:statusCode5>
    <ns0:addressNumberCommunity18>0</ns0:addressNumberCommunity18>
    <ns0:amountFuture1>0</ns0:amountFuture1>
    <ns0:amountUserDefinedAmount07>0.00</ns0:amountUserDefinedAmount07>
    <ns0:addressNumberUserReserved01>0</ns0:addressNumberUserReserved01>
    <ns0:amountFuture2>0</ns0:amountFuture2>
    <ns0:addressNumberCommunity11>0</ns0:addressNumberCommunity11>
    <ns0:amountFuture3>0</ns0:amountFuture3>
    <ns0:averageCostPercent9>0.00</ns0:averageCostPercent9>
    <ns0:userDate2 xsi:nil="1"/>
    <ns0:description001>Treybrooke Village </ns0:description001>
    <ns0:amountFuture5>0</ns0:amountFuture5>
    <ns0:homeBuilderArea_Desc>Northwood Washington Division</ns0:homeBuilderArea_Desc>
    <ns0:dateUpdated>2008-10-27T00:00:00.000-07:00</ns0:dateUpdated>
    <ns0:averageOtherCost01>30000.00</ns0:averageOtherCost01>
    <ns0:addressNumberCommunity>1000141</ns0:addressNumberCommunity>
    <ns0:userDate8 xsi:nil="1"/>
    <ns0:numberOfClosedLots>0</ns0:numberOfClosedLots>
    <ns0:userDate9 xsi:nil="1"/>
    <ns0:addressNumberCommunity03>120004</ns0:addressNumberCommunity03>
    <ns0:averageCostPercent8>0.00</ns0:averageCostPercent8>
    <ns0:phase>000</ns0:phase>
    <ns0:averageOtherCost02>15000.00</ns0:averageOtherCost02>
    <ns0:programId>EP44H101 </ns0:programId>
    <ns0:addressNumberCommunity20>0</ns0:addressNumberCommunity20>
    <ns0:updatedByUser>JOE </ns0:updatedByUser>
    <ns0:homeBuilderRuleTypeSales_Desc>JDE Builder Standard </ns0:homeBuilderRuleTypeSales_Desc>
    <ns0:numberOfFinishedLots>0</ns0:numberOfFinishedLots>
    <ns0:averageCostPercent1>10.00</ns0:averageCostPercent1>
    <ns0:amountUserDefinedAmount01>0.00</ns0:amountUserDefinedAmount01>
    <ns0:addressNumberCommunity19>0</ns0:addressNumberCommunity19>
    <ns0:averageCostPercent7>0.00</ns0:averageCostPercent7>
    <ns0:amountUserDefinedAmount05>0.00</ns0:amountUserDefinedAmount05>
    <ns0:schedulingEnabled>0</ns0:schedulingEnabled>
    <ns0:userDate1>2004-02-16T00:00:00.000-08:00</ns0:userDate1>
    <ns0:averageCostPercent6>0.00</ns0:averageCostPercent6>
    <ns0:addressNumberCommunity01>1000686</ns0:addressNumberCommunity01>
    <ns0:homeBuilderRuleTypeConstruction>400</ns0:homeBuilderRuleTypeConstruction>
    <ns0:addressNumberUserReserved04>0</ns0:addressNumberUserReserved04>
    <ns0:addressNumberCommunity08>1000678</ns0:addressNumberCommunity08>
    <ns0:addressNumberCommunity09>120003</ns0:addressNumberCommunity09>
    <ns0:averageOtherCost05>0.00</ns0:averageOtherCost05>
    <ns0:closingWorksheetTemplate>TMP - 110 </ns0:closingWorksheetTemplate>
    <ns0:averageOtherRevenue03>100.00</ns0:averageOtherRevenue03>
    <ns0:planMasterProductGroup_Desc xsi:nil="1"/>
    <ns0:timeLastUpdated>193819</ns0:timeLastUpdated>
    <ns0:userDate10 xsi:nil="1"/>
    <ns0:userDate3 xsi:nil="1"/>
    <ns0:amountFuture4>0</ns0:amountFuture4>
    <ns0:averageOtherRevenue01>10000.00</ns0:averageOtherRevenue01>
    <ns0:originalProgramId>EP44H101 </ns0:originalProgramId>
    <ns0:phaseEnablingFlag>0</ns0:phaseEnablingFlag>
    <ns0:userDate4 xsi:nil="1"/>
    <ns0:averageOtherRevenue02>1000.00</ns0:averageOtherRevenue02>
    <ns0:userDate5 xsi:nil="1"/>
    <ns0:averageCostPercent10>0.00</ns0:averageCostPercent10>
    <ns0:amountUserDefinedAmount04>0.00</ns0:amountUserDefinedAmount04>
    <ns0:averageCostPercent4>0.00</ns0:averageCostPercent4>
    <ns0:averageCostPercent2>5.00</ns0:averageCostPercent2>
    </ns0:communityPhaseResult>
    </ns0:getCommunityPhaseMasterResponseElement>

    Yes, but probably for a different reason: limit of 63 columns for a table.
    Can you simply the XML source, make it look like the millions of examples in the documentation in terms of tags/structure?

  • Strange issue creating a BCP xml format file with double dagger '‡' (alt + 0135) as column terminator with bcp.exe

    Hi,
    I'm having issues generating a BCP XML format file using a fairly unusual column terminator, a double dagger symbol
    ‡ (alt + 0135) which I need to support.
    I'm experiencing this problem with bcp.exe for SQL2008 R2 and SQL2012.
    If I run the following command line:
    bcp MyDB.TMP.Test_Extract format nul -c -x -f "C:\BCP\format_file_dagger_test.xml" -T -S localhost\SQL2012 -t‡
    I end up with a XML format file like so:
    <?xml version="1.0"?>
    <BCPFORMAT xmlns="http://schemas.microsoft.com/sqlserver/2004/bulkload/format" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <RECORD>
      <FIELD ID="1" xsi:type="CharTerm" TERMINATOR="ç" MAX_LENGTH="255" COLLATION="SQL_Latin1_General_CP1_CI_AS"/>
      <FIELD ID="2" xsi:type="CharTerm" TERMINATOR="ç" MAX_LENGTH="50" 
    .. and so on.
    You will notice that the TERMINATOR="ç" (Minuscule c-cedilla) is output instead of TERMINATOR="‡". The
    ç character, is strangely enough is alt + 135 (and not alt + 0135) so this might more than a coincidence! I know you can specify the codepage but this switch applies the data being imported or extracted and not for the format file
    itself (I tried it anyway). 
    In order to use the XML file to bulk import I manually did a text substitution of 'ç' character for '‡' and then BCP imports '‡' data fine. 
    This character swap doesn't occur if I generate a non XML format file (the '‡' character is output in the format file correctly) however, this file produces other import errors, which I don't encounter if I use a standard delimiter like a comma. So I have stuck
    with the working XML format file which I prefer.
    Does anyone know why this is happening? I'm planning to automate the generation the of the XML format file and would like to avoid the additional step of text substitution if possible.
    Thank you.

    Hi Ham09,
    According to your description , we do a test and find that the character of the terminator is changed due to the code page of Operation System. When you choose the different time zone in Data and Time bar, and do the same bcp test, you will find it will
    export the different TERMINATOR in your XML format file. For example, you can import the character "ç" (alt + 135) in (UTC-12:00)International Date Line West time zone and (UTC+09:00)Osaka, Sapporo, Tokyo time zone, and check if the terminators are different.
    By default, the field terminator is the tab character (represented as \t). To represent a paragraph mark, use \r\n.
    For more information, there is detail about code page(Windows), you can review the following article.
    http://msdn.microsoft.com/en-us/library/windows/desktop/dd317752(v=vs.85).aspx
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Easiest and/or best methods for generating XML output (not with a report)

    Hi, several of our EBS customers (11.5.10) are converting their PDF reports to use XML/BI publisher to produce output. The data stream comes from a report that generates the XML output, and then the XML template is applied. This works great ... no problems, etc. From what I have read, however, Oracle intends to treat the traditional Forms and Reports Developers as legacy tools (although still supporting them, of course).
    My question is if I wanted to ditch using Reports to generate XML output, what, in your opinion or in your current usage, is the easiest way of getting this data? In Reports, the data modeler is excellent in providing a method to write your queries, split them into different repeating groups, write formula and summary columns, link multiple queries, etc, etc. If one were to become Reports Developer free, what comparable tools are available to take its place? I would expect this tool to handle a mix of GUI and coding like the Reports data modeler. Please note that I'm not looking for an EBS-specific solution -- say for a custom application using regular Oracle 10g DB and iAS, with BI Publisher for reporting.
    Thanks for your feedback,
    Ryan

    What I'm looking for is to not use Oracle Reports to generate the XML data output since Oracle's statement of direction is pushing BI Publisher rather than Oracle Reports as the preferred tool for reporting. That said, the data modeler in Reports provides a very flexible tool to construct and link multiple queries and to manipulate the queries into several levels of a master/detail relationship. Further, the mix of GUI and coding makes setting up the data model a lot more efficient. What I'm looking for (and I don't know if anything exists) is something comparable that can be used to generate XML output from the DB -- the idea being that I wouldn't use legacy tools, like Reports, for this task. I hope that is clearer.
    Really, another way of answering my question is, aside from Reports and the APIs mentioned so far, what are my fellow developers using, if anything, to extract XML data in a way that handles the features i list above?

  • Cannot rename file with non-ASCII characters when using the

    My application moves files from one directory to another by calling File[] srcFiles = srcDir.listFiles() to get a list of files in the source directory, and then calling srcFiles.renameTo(destFile) to rename each file.
    This does not work (renameTo returns false and the file is not moved) under the following circumstances:
    - the file's leaf name contains non-ASCII characters, for example "�"
    - the OS is Solaris 9
    - the LANG and LC_* environment variables are unset, i.e. the C locale is being used
    If I set the LANG environment variable to, for example, en_GB.UTF-8 then the rename succeeds.
    I have tried calling srcFiles[index].getName().getBytes("UTF-8") and the non-ASCII characters are being replaced with ? (0x3f) characters when LANG is unset.
    Is this a bug in the JRE? I would argue that since my code does not actually manipulate the filename (I just use the File object that File.listFiles() gives me) then the rename should succeed. Of course I would not expect the file name to be displayed correctly if I printed it out.
    I have reproduced this behaviour with JDK 1.4.2_05 and 1.5.0_04 on Solaris 9.
    Francis

    Thanks for the info Alan.
    I considered setting the locale in the environment (this sounds like the "correct" fix to me and we might implement it later), but this application shares a WebLogic server with many other applications so we would have to do a huge amount of testing to make sure that the locale change wouldn't break the other apps. In the end I worked around the problem by making the code that generates the filenames in the first place strip out any non-ASCII characters (the names of the files are not critically important).
    Looking forward to JSR-203, in the meantime perhaps a note about this behaviour in the java.io.File javadoc would be useful.

  • Reading a text file with foreign language characters

    I'm trying to convert foreign language characters to English looking characters.  I have code that works, but only if I hard code the string with foreign language characters and pass it to the function. I cannot figure out how to get my program to read
    in the foreign characters from my file, they come in as garbage. 
    Since the function works when I pass a hard coded string to it, I'm pretty sure the problem is the way I have the Streamreader set up, it's just not reading the characters correctly...
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim FileRdr As StreamReader = New StreamReader "m:\test\charReplace.txt", System.Text.Encoding.UTF7)
    Dim ReplaceWrtr As StreamWriter ReplaceWrtr = System.IO.File.CreateText("M:\test\CharReplaceOut.txt")
    Do While FileRdr.Peek() >= 0
    Dim currentRec As String = FileRdr.ReadLine
    removeAccent(currentRec)
    ReplaceWrtr.WriteLine(currentRec)
    Loop
    ReplaceWrtr.Close()
    End Sub
    'Replace foreign language characters with English characters
    Function removeAccent(ByVal myString As String)
    Dim A As String = "--"
    Dim B As String = "--"
    Const AccChars As String = "ŠŽšžŸÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðñòóôõöùúûüýÿ"
    Const RegChars As String = "SZszYAAAAAACEEEEIIIIDNOOOOOUUUUYaaaaaaceeeeiiiidnooooouuuuyy"
    For i As Integer = 1 To Len(AccChars)
    A = Mid(AccChars, i, 1)
    B = Mid(RegChars, i, 1)
    myString = Replace(myString, A, B)
    Next
    removeAccent = myString
    End Function
    I know that removing the accent changes the meaning of the word, but this is what the user wants so it's what I need to do. 
    Any help is greatly appreciated!! :)
    Thanks!
    Joni

    Finally got it to work.  I had to remove the first 5 characters from the replacement string (ŠŽšžŸ), couldn't find encoding that would handle these, and to be honest, I didn't really need them.  The important ones are still there, was probably
    just overkill on my part.
    UTF7 worked for the rest...
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim FileRdr As StreamReader = New StreamReader("m:\test\charReplace.txt", System.Text.Encoding.UTF7)
    Dim ReplaceWrtr As StreamWriter
    ReplaceWrtr = System.IO.File.CreateText("M:\test\CharReplaceOut.txt")
    Do While FileRdr.Peek() >= 0
    Dim currentRec As String = FileRdr.ReadLine
    removeAccent(currentRec)
    ReplaceWrtr.WriteLine(currentRec)
    Loop
    ReplaceWrtr.Close()
    End Sub
    'Replace foreign language characters with english characters
    Function removeAccent(ByRef myString As String)
    Dim A As String = "--"
    Dim B As String = "--"
    Const AccChars As String = "ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðñòóôõöùúûüýÿ"
    Const RegChars As String = "AAAAAACEEEEIIIIDNOOOOOUUUUYaaaaaaceeeeiiiidnooooouuuuyy"
    For i As Integer = 1 To Len(AccChars)
    A = Mid(AccChars, i, 1)
    B = Mid(RegChars, i, 1)
    myString = Replace(myString, A, B)
    Next
    removeAccent = myString
    End Function
    Thanks for all your help!  Greatly appreciated :)
    -Joni

  • Export to flat file with unicode (chinese) characters??

    I have an SSIS (2013) package that needs to send an email notification with query results (via attachment). I have a data flow task with a source sql query that gathers 2 columns - ID and NAME. ID is varchar, NAME is nvarchar (some records have Chinese symbols).
    The destination is a .txt file. When I copy/paste a field w/ Chinese symbols to a .txt file, it shows up fine, so i know Notepad can handle the characters. I also have the .txt file set to Unicode encoding (I also tried ANSI originally). When I run the package,
    it says that it successfully moves 50 fields to the flat file. However, when I open the flat file, I see that it shows 10 records. It stops when it gets to the record with a Chinese symbol in it...but doesn't produce an error. My plan was to then take the
    attachment and use it in a Send Mail task. (i have the smtp/mail notification working fine...just need to figure out how to get the data to all export to the flat file correctly)
    Does anyone know how I can get the ID and NAME fields from a query into an email notification (either as an attachment, or even formatted nicely (with tabs) in an email would work).

    Hi,
    Based on my test, I can reproduce the similar issue in my environment. When we create the Flat File Connection Manager with the default settings, the data in flat file stops when goes to the Chinese characters.
    To fix the issue that makes the Chinese characters to actually get written into the flat file, we should check the Unicode checkbox on the right hand side of Locale property in Flat File Connection Manager. In this way, the flat file can display Chinese
    characters.
    The following screenshot is for your reference:
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Creating xml format file with double dagger ‡ as delimiter

    Hi,
    My source files are delimited with double dagger (‡) and I am using openrowset to load the files to SQL Server. When I am creating the format file by specifying the delimiter as ‡, the format file created has a different delimiter than the specified one.
    The new delimiter appearing in xml format file is ç.
    Any help?
    TIA
    Nitesh Rai- Please mark the post as answered if it answers your question

    How did you create format file?
    Try this method and see if it works
    http://visakhm.blogspot.com/2013/10/generate-format-files-based-on-table.html
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Maybe you are looking for

  • On my new macbook pro (15-inch retina, OS X Mavericks), I can't install anything.

    I recently got a new macbook pro with os x mavericks. Everything works perfectly, except that whenever I try to install anything from the internet (Adobe Flash Player), it tells me that the package is damaged and I should eject the disk image file. A

  • JZ0T3: Read operation timed out

    Hi! I'm trying to solve this problem for a while and actually I couldnt find the cause of the problem. For some reason, deep inside the code of my application that error happends when I execute some inserts on the same Sybase table (they could be per

  • Viewing color channels *not* in color

    Hi all, This question likely has an extremely simple solution, but I haven't found it. In versions past, Photoshop preferences had a check box to view channels in color (or not). I always liked viewing them in grayscale, mixing and matching and so fo

  • Looping a movie clip a specific number of times in Flash

    Does anyone know how to get a movie clip to loop a specific number of times in Flash? I know how to stop a movie clip from looping by using the this.stop (); command by placing the command in a separate Action Script layer, in a keyframe, inside of t

  • Photosmart 475 with HP 100 grey ink

    Hi all, I wish to print some black and white photos on my 475 printer with the HP 100 grey cartridge, but before I go and purchase the cartridge does anyone have any experience using it? Do I need my photo to be in black and white/greyscale, print in