Assign Proper Case Temp Variable: No data is available for encoding 1252. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method


StrConv(City,VbStrConv.ProperCase)

How to solve it?

Hi @Dingkun_Yang

Try the below expression,

System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(City.ToLower)

Hope it helps!!

Hi,

Probably, it’s necessary to call the following in advance.

System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance)

The following topic will help you.

Regards,

2 Likes

It works.
Thank you.

1 Like

It’s my pleasure… @Dingkun_Yang

Make my post Mark as solution to close the loop.

Happy Automation!!

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