Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Description encoding error with YouTube API v3

I've successfully created a project to upload YouTube videos programmatically through VB.NET, and it has worked for some weeks now until today.

I'm having trouble uploading videos which contain German umlauts in the description field: as soon as I try to upload such a video, I'm getting the following WebException:

System.Exception: Bad Request ---> System.Net.WebException:

If I remove the description field or the umlauts, the upload works without problems.

I've also tried to UTF8-encode the string, but not successfully.

The error just occurred today...

like image 297
user2524587 Avatar asked Jan 23 '26 02:01

user2524587


1 Answers

I had the very same error today: it was occurring with Japanese and Korean while English and Chinese/Taiwanese were fine.

At first, I thought it was utf8 related. A few hours later, I found out YouTube does not rely on ISO 3166-1. You can get their list there.

Replacing 'jp' to 'ja' and 'kr' to 'ko' in defaultAudioLanguage fixed the issue.

like image 90
ddc Avatar answered Jan 27 '26 02:01

ddc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!