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.
Flowheater Chart

how to replace non ascii characters

More
5 months 1 week ago #3801 by brian clark
how to replace non ascii characters was created 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
5 months 1 week ago #3802 by brian clark
Replied by brian clark on topic how to replace non ascii characters
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
5 months 1 week ago #3803 by brian clark
Replied by brian clark on topic how to replace non ascii characters
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.254 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.