How to convert back from UTF8 to ISO-8859-1 encoding?

hi,
I have a bunch of XML files which were wrongly encoded, and we lost all our accent characters.
ie: é become é
so how can I recover my XML files using powershell?
so I want to change all the UTF8 ecoded characters back to the original ISO accent character
é -> é
I try this:
1")
$utf8 = [System.text.Encoding]::UTF8
$utfBytes = $utf8.GetBytes("é")
$isoBytes = [System.text.Encoding]::Convert($utf8, $iso, $utfBytes)
$iso.GetString($isoBytes)
but doesnt works.
so is there a way to do this in powershell?
I have to scan hundreds of files...
thanks.

You can't.  UTF-8 strips all of the information from the characters so you cannot know which characters are which.  If you know which characters you need to fix (requires knowing the spelling of the words) you could possible develop an matrix of
replacements. There is no simple one line method.
¯\_(ツ)_/¯

Similar Messages

  • OSB - Code Page Conversion - From UTF8 to iso-8859-1; cp1252 etc...

    Hi,
    I have a requirement to convert a UTF-8 data to other encoding formats like cp1252; iso-8859-1 etc... Please let me know how this can be done, in OSB? Appreciate your response.
    Regards...

    Hi,
    Yes you can change it in transport configuration tab. Please follow the below link for more details.
    http://docs.oracle.com/cd/E17904_01/doc.1111/e15866/transports.htm#i1268967
    Thanks,
    Durga
    - It is considered good etiquette to reward answerers with points (as "helpful"  or "correct").

  • How to convert date from ccyymm format to mmddyy

    hi,
    How to convert date from ccyymm format to mmddyy

    Please don't multipost. This question has been answered in your first post.
    How to convert date to ccyymm format
    Regards,
    Jo

  • HT1498 Horrible experience and the movie kept stalling through iTunes on appletv. Gave up (after paying for it) and ended up renting it through cable provider. Anyone know how to get $ back from apple?!

    Horrible experience and the movie kept stalling through iTunes on appletv. Gave up (after paying for it) and ended up renting it through cable provider. Anyone know how to get $ back from apple?!

    Issues are usually network related
    What is your internet speed? www.speedtest.net
    6mbps is required for instant HD (you can switch to SD in the settings)
    If on wifi try ethernet and www.istumbler.net to rule out interference
    Make sure you're using your ISP's DNS

  • How to convert music from one apple account to another

    how to convert music from one apple account to another

    leilaboxergirl wrote:
    The apple account music you want to transfer >> go to itunes store and log into the apple account that you want music to be put on your ltunes library...sign in then after you sign in then look down on right hand side for the word "Purchased" and those are the accounts songs and you can download them for free.
    Note that this does not change the iTunes account of these songs. This simply adds them to the iTunes library you are using.
    Also note than once you do this, you will have to wait 90 days to redownload any iTunes purchases from any other iTunes account, including the original iTunes account.
    It is possible to transfer itunes music from one account to another!
    No it is not!

  • How to store UTF-8 characters in an iso-8859-1 encoded oracle database?

    How can we store UTF-8 characters in an iso-8859-1 encoded oracle database? We can NOT change the database encoding but need to store e.g. Polish or Russian characters besides other European languages.
    Is there any stable sollution with good performance?
    We use Oracle 8.1.6 with iso-8859-1 encoding, Bea WebLogic 7.0, JDK 1.3.1 and the following thin driver: "Oracle JDBC Driver version - 9.0.2.0.0".

    There are a couple of unsupported options, but I wouldn't consider using them on a production database running other critical applications. I would also strongly discourage their use unless you understand in detail how Oracle National Language Support (NLS) works, otherwise you could end up with corrupt data or worse.
    In a sense, you've been asked to do the impossible. The existing databas echaracter sets do not support encoding the data you've been asked to store.
    Can you create a new database with an appropriate database character set and deploy your application there? That's probably the easiest solution.
    If that isn't an option, and you really need to store data in this database, you could use one of the binary data types (RAW and BLOB), but that would mean that it would be exceptionally difficult for applications other than yours to extract the data. You would have to ensure that the data was always encoded in the same character set, otherwise you wouldn't be able to properly decode it later. This would also add a lot of complexity to your application, since you couldn't send or recieve string data from the database.
    Unfortunately, I suspect you will have to choose from a list of bad options.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • File adapter ISO-8859-1 encoding problems in XI 3.0

    We are using the XI 3.0 file adapter and are experiencing some XML encoding troubles.
    A SAP R/3 system is delivering an IDoc outbound. XI picks up the IDoc and converts it to an external defined .xml file. The .xml file is send to a connected ftp-server. At the remote FTP server the file is generating an error, as it is expected to arrive in ISO-8859-1 encoding. The Transfer Mode is set to Binary, File Type Text, and Encoding ISO-8859-1.
    The .xml file is encoded correctly in ISO-8859-1, but the problem is that the XML encoding declaration has the wrong value 'UTF-8'.
    Does anybody know of a work around, to change the encoding declaration to ‘ISO-8859-1’ in the message mapping program?

    An example of the XSL code might be as follow:
    <?xml version='1.0'?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method='xml' encoding='ISO-8859-1' />
    <xsl:template match="/">
         <xsl:copy-of select="*" />
    </xsl:template>
    </xsl:stylesheet>

  • Setting ISO-8859-1 Encoding in AXIS RPC call

    As per my understanding UTF-8 is default for webservice call in AXIS implementation I may be wrong.
    Is there any way to set ISO-8859-1 encoding in AXIS RPC call?
    Below is the WSDL file details.
    Thanks for you help.
    Regards,
    Hemen
    <Code>
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <definitions name="TestService_Service"
    targetNamespace="http://webservice.de.rt.wsdl.WebContent/TestService_Service/"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
    xmlns:java="http://schemas.xmlsoap.org/wsdl/java/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://webservice.de.rt.wsdl.WebContent/TestService_Service/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <message name="getResponseRequest">
    <part name="xml" type="xsd:string"/>
    <part name="product" type="xsd:string"/>
    <part name="source" type="xsd:string"/>
    <part name="tran" type="xsd:string"/>
    <part name="content" type="xsd:string"/>
    </message>
    <message name="getResponseResponse">
    <part name="return" type="xsd:string"/>
    </message>
    <portType name="TestService">
    <operation name="getResponse" parameterOrder="xml product source tran content">
    <input message="tns:getResponseRequest" name="getResponseRequest"/>
    <output message="tns:getResponseResponse" name="getResponseResponse"/>
    </operation>
    </portType>
    <binding name="TestServiceJavaBinding" type="tns:TestService">
    <java:binding/>
    <format:typeMapping encoding="Java" style="Java">
    <format:typeMap formatType="java.lang.String" typeName="xsd:string"/>
    </format:typeMapping>
    <operation name="getResponse">
    <java:operation methodName="getResponse"
    parameterOrder="xml product source tran content" returnPart="return"/>
    <input name="getResponseRequest"/>
    <output name="getResponseResponse"/>
    </operation>
    </binding>
    <binding name="TestServiceBinding" type="tns:TestService">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="getResponse">
    <soap:operation soapAction="" style="rpc"/>
    <input name="getResponseRequest">
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    namespace="distributionengine.com"
    parts="xml product source tran content" use="encoded"/>
    </input>
    <output name="getResponseResponse">
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    namespace="distributionengine.com" use="encoded"/>
    </output>
    </operation>
    </binding>
    <service name="TestServiceService">
    <port binding="tns:TestServiceJavaBinding" name="TestServiceJavaPort">
    <java:address className="rt.de.webservice.TestService"/>
    </port>
    </service>
    <service name="TestService_Service">
    <port binding="tns:TestServiceBinding" name="TestServicePort">
    <soap:address location="http://localhost:9080/servlet/rpcrouter"/>
    </port>
    </service>
    </definitions>
    </code>

    try to put the below code at the top of the JSP page
    <%@ page language="java" pageEncoding="UTF-8"%>

  • WSDL Generating in ISO-8859-1 encoding want in UTF - 8

    Hi XI Geeks,
           When I am using "Define Web Service" tool in Integration Directory, the WSDL file is being created with encoding <b>ISO-8859-1</b>, <i><b>but we want in "UTF-8"</b></i>.
            Is there any setting we need to change in WAS which will change this default.
    Any ideas are welcome and thanks in advance.
    Regards
    Sujan

    Hi Vishnu,
             We already did that for the time being. But the client wants it be consistent.
             In another client engagement the WSDL is created in  "UTF-8" format we double checked twice.
             We are running on SP12.
    If any of the SP12 guys can generated a WSDL and let us know that it is created in "ISO-8859-1" encoding.
    Regards
    Sujan

  • How to convert date from "yyyymmdd" to "MM/DD/YYYY" format

    1. I have one BLDAT field in my internal table.
       its getting updated from input file.
    2. The value in the input file is like yyyymmdd.
       So the internal table field is filled like this
       "YYYYMMDD".
    3. After this,I have to compare this internal table  
       field with BSAD table.
    4. The BLDAT field in BSAD table is in the format of 
       "MM/DD/YYYY".
    5. the BLDAT field is having diff format in internal  table and BSAD table.So I am unable to check this value.
    How to convert it as like the BSAD table format."MM/DD/YYYY" format.
    Thanks in advance!!

    Using the WRITE statement
      data: gd_date(10).  "field to store output date
    * Converts date from 20020901 to 09.01.2002
      write sy-datum to gd_date mm/dd/yyyy.
    OR u can
    CONCATENATE gd_date+4(2) gd_date+6(2) gd_date+0(4)
    into gd_date seperated by '/' .
    Hope this helps.
    Kindly reward points and close the thread for the
    answer which helped u OR get back with queries.

  • Convert from ISO 8859-1 encoding to UTF-8

    Hi
    My Os name is 'SunOS ut51109 5.10 Generic_144500-19 sun4v sparc SUNW,T5440'.
    I want to change the encoding of the existing .bcp file from ISO 8859-1 to UTF-8 with out using any temp files as these .bcp file will be pointed by an external table.
    here is the command I issued in the script(ksh file)
    iconv -f ISO8859-1 -t UTF-8 file1.bcp > file1.bcp
    After the script got executed file1 is empty(showing 0 bytes).
    Please correct me or let me know the syntax to be followed to write the data into the same file in UTF-8 format.
    Thanks
    kartheek

    You cannot do conversion from ISO 8859-1 to UTF-8 in-place because the UTF-8 version will generally be longer (unless you convert a pure ASCII file, which does not need conversion in the first place). Therefore, you would have to overwrite what you have not read yet. Instead, convert to a new file with a temporary name, drop the original and rename the temporary back to original. This is not that complicated.
    If the problem is that you want to overwrite a file already open by the database, then rename the incoming file first and then convert copying to the target.
    -- Sergiusz

  • How to convert value from exp. value to double/float???

    Hi all,
    I am fetching values from database, which is of type double / float.
    eg. values will be like -22,777,548 will be stored in database.
    NOw if i use
    float a= rs.getFloat(1);
    out.println("a="+a);
    I get output as a= -2.2777548E7
    I want to remove "E" from out put value and display as it was given in DB.
    How to solve this problem?
    Please Help!
    Regards
    Ashvini

    What do you mean - 'how does it work' ? All format classes (MessageFormat, DecimalFormat , SimpleDateFormat etc) are used to convert data from one form to other. Go through the java.text.* api. They work based on some pattern searches, pattern matches etc - dont know in detail :)
    As for the other things, thanks :)
    cheers,
    ram.

  • HT204382 how to convert movies from flip for use in final cut pro

    How do you convert movies from a Flip video camera for use in final cut pro?

    DVDs are in a socalled delivery format (mpeg2), which isn't meant and made for any processing as editing...
    in recommended order, choose one of the following tools/workarounds:
    DVDxDV (free trial, 25$, Pro: 90$)
    Apple mpeg2 plugin (19$) + Streamclip (free)
    VisualHub (23.32$)
    Drop2DV (free)
    Cinematize >60$
    Mpeg2Works >25$ + Apple plug-in
    Toast 6/7/8 allows converting to dv/insert dvd, hit apple-k
    connect a miniDV Camcorder with analogue input to a DVD-player and transfer disk to tape/use as converter
    http://danslagle.com/mac/iMovie/tips_tricks/6010.shtml
    http://danslagle.com/mac/iMovie/tips_tricks/6018.shtml
    http://karsten.schluter.googlepages.com/convertdvdstodvs
    (advice is for imports to iM... )
    none of these methods or tools override copy protection/DRM mechanisms.. advice on 'ripping' is a violation of the ToU of this board ..
    +be nice to copy rights ...+

  • How to convert llb from LabVIEW version 8 to 7.1

    Can someone tell how to convert the llb from LabVIEW version 8 to version 7.1?
    I hope to sent the program to the others, but the other side are using LabVIEW version 7.1 but not version 8.0.
    I know I can save to VI file as previous version, but it contains severals of VI in the library, it is quite time consuming.
    Can everyone sugguest any method or solution to solve my problem.
    Thanks.

    Hi anson,
    it will run also in LV7.1 - but you should check those warnings (probably things not/differently supported by LV7.1...) anyway!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • 3700 AP - Best way to convert back from Autonomous to LIghtweight

    I have a 3700 AP that I have up & running as Autonomous. I recently got a 2504 WLC and would like to put the AP back to Lightweight and run it from the 2504.  
    The 2504 is running 8.0.110.0 code and I have the current 3700 Lightweight Recovery image and IOS downloaded as well. 
    I have done done some searches and most of he articles are conversion to Autonomous. Not much is out there for putting it back. Some articles just mention needing the Lightweight  recovery image while others state I can use the Mode button and just have a TFTP server running  in a specific subnet and the AP will "pull" down the code and convert back.  Almost all of the articles refer to old model APs...
    Looking for clarity in the process as I certainly don't want to brick this 3700 AP. 
    Thx. 

    Hi
    You can use either methods & it will work (even for 3700)
    If you using mode button method, make sure you rename the recovery image something like this ap3g2-k9w7-tar.default. Refer this post for detail
    http://mrncciew.com/2013/12/13/ap-conversion-using-mode-button/
    Normal method is described here
    http://mrncciew.com/2012/10/20/lightweight-to-autonomous-conversion/
    HTH
    Rasika
    **** Pls rate all useful responses ****

Maybe you are looking for

  • Error on Automatic PO at GR Level

    Hi, I wish to enable automatic PO creation, on goods receipt. For this I have done the following in config: 1) Assigned a standard Purchasing Org for the plant 2) Created a standard Purchasing Inforecord for the material, vendor combination 3) Enable

  • Help on removing items in Tiger

    Hi All I am a new here and this is my first post, I am also new to Macs,so be gentle. Could someone shed some light on how to get rid of some of the Apps installed with Tiger besides the 1 GB of other lanugage files I dont need: Automator Apple Remot

  • Date  in text field

    Hi, I have a text field :P1_DATE . I want to enter date into it and date can be in any format like 01102012 means 01/10/2012 .if i enter date like 01102012 this should be enter like a date in table as date column accept.when i edit to the record date

  • Windows Server 2008 R8 restarts on RDP

    Hello  I got a problem with my windows server 2008R2 datacenter edition. Every time a remote user shall connect to the server, the server reboots. What causes it to do that? I have tried to set the server to not starts auto so I get a Blue Screen, I

  • Error When Installing X11...

    I was trying to install X11 so I can use GIMP, a free photoshop like program. Anyways, when trying to instal, it says "You Cannnot install X11 on this volume. Software already exists on your computer. I was trying to install it on the Macintosh HD. I