You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error occurs when setting the title to Chinese: Content size exceeds specified content length.
The way to fix this problem is to add it to the file \lib\src\soap\soap_action. dart on line 45 and replace headers.contentLength = content.length , amend - to headers. contentLength = utf8.encode(content).length,because the length of Chinese characters after UTF-8 encoding is not equal to the length of the original string. (1 Chinese character = 2 English characters)
The text was updated successfully, but these errors were encountered:
当设置title为中文时会报错:
Content size exceeds specified content length.
修复这个问题的方法是,在文件
\lib\src\soap\soap_action.dart
的第45行,把headers.contentLength = content.length
,修·改为headers.contentLength = utf8.encode(content).length
,因为中文字符在UTF-8
编码后的长度不等于原字符串长度。(1中文字符=2英文字符)The error occurs when setting the title to Chinese:
Content size exceeds specified content length.
The way to fix this problem is to add it to the file
\lib\src\soap\soap_action. dart
on line 45 and replaceheaders.contentLength = content.length
, amend - toheaders. contentLength = utf8.encode(content).length
,because the length of Chinese characters afterUTF-8
encoding is not equal to the length of the original string. (1 Chinese character = 2 English characters)The text was updated successfully, but these errors were encountered: