Strconv strconv(variable,vbstrconv.ProperCase) ends with "No data is available for encoding 1252

I have just converted my project from Windows Legacy to Windows as prompted at the top section of my project.

Unable to get past the strconv conversion.
image

It is ending with the following error:-
Message Box: No data is available for encoding 1252. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.

Thanks in advance,

1 Like

Hi,

The following post might help you.

Regards,

Hi @MKF_Motor_Sdn_Bhd

Checkout this expression

System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase("SAMPLE".ToLower)

Regards
Sudharsan

1 Like

Any reason why after conversion it can’t understand Windows-1252 encoding?
I had to invoke method in order to use strconv (vb text handling method)

image
o

HI,

It’s specification of .Net5/6. We need to use System.Text.Encoding.RegisterProvider(CodePagesEncodingProvider.Instance) in advance, if need to use specific encoding.

Regards,

You can also give it a try and let me know if its working @MKF_Motor_Sdn_Bhd

Regards
Sudharsan

4 Likes

Was wondering why before conversion it was included in windows legacy and why it’s removed now.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.