Skip to main content
simply more productive
The Data Specialist

✅ Easy data integration - import/export
✅ No programming required thanks to visual modeling
✅ Simple ETL tool with versatile options

Up to 100,000 records can be processed with the freeware version!
Flowheater Chart

how to replace non ascii characters

More
1 year 9 months 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
1 year 9 months 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
1 year 9 months 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.128 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:
info@flowheater.net


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