Skip to main content
simply more productive

The Data Specialist

Thanks to our intuitive transformation designer, you can convert data effortlessly to a variety of formats without knowing how to program. It’s not only efficient, it’s also easy to use.
Up to 100,000 records can be processed with the freeware version!
Flowheater Chart

how to replace non ascii characters

More
6 months 3 weeks ago #3801 by brian clark
Using regex
RegexReplace(File, '\xE2\x98\x8E', '') and the file are html files.

Am i doing this correctly?

Please Log in or Create an account to join the conversation.

More
6 months 3 weeks ago #3802 by brian clark
Replied by brian clark on topic how to replace non ascii characters - Post(3802)
using System;
using System.Text.RegularExpressions;

public object DoWork()
{
    int count = InValues.Length;

    // Ensure at least one parameter is passed
    if (count < 1)
    {
        string msg = ".NET Script Heater: minimum one input parameter expected!";
        if (TestMode)
        {
            return msg;
        }
        else
        {
            throw new ArgumentException(msg);
        }
    }

    // Get the input HTML content
    string inputText = (string)InValues[0].GetValue();

    // Remove all non-ASCII characters
    string cleanText = Regex.Replace(inputText, @"[^\u0000-\u007F]", "");

    // Return the cleaned text
    return cleanText;
}

its past on from html / file to multiple regex then this script. 
any pointers what i am doing wrong here... and where is the html input here (just so it sinks in)

Please Log in or Create an account to join the conversation.

More
6 months 3 weeks ago #3803 by brian clark
Replied by brian clark on topic how to replace non ascii characters - Post(3803)
omg im a plonker. put the system part in the advanced section...
Cheers
it works so far so good.

Please Log in or Create an account to join the conversation.

Time to create page: 0.255 seconds
FlowHeater Logo

FlowHeater - The Data Specialist

Efficient data integration and transformation with FlowHeater – the perfect solution for a seamless transfer of your data.

Legal information

Support & Contact

Contact

Phone:
0951 / 9933 9792

eMail:
This email address is being protected from spambots. You need JavaScript enabled to view it.


Copyright © 2009-2024 by FlowHeater GmbH. All rights reserved.