-
Notifications
You must be signed in to change notification settings - Fork 841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MySql 8.0.28 Emoji 字符 插入错误 #1789
Comments
修改数据库编码 |
表 数据库 连接串 都改了还是报错 |
卸载FreeSql.Provider.MySql,换 FreeSql.Provider.MySqlConnector 试试 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述及重现代码:
MySql 8.0.28 数据库编码是 utf8mb4 , navicat 可以正常插入Emoji 字符, 但是框架插入报错 error Incorrect string value: '\xF0\x9F\x8F\xA1' for column 'Title' at row 1 连接字符串中有添加 Charset=utf8mb4; 或 Charset=utf8 都没有效果
数据库版本
MySql 8.0.28
安装的Nuget包
freeSql 3.2.821
.net framework/. net core? 及具体版本
.net8
错误堆栈
FaGardenApi.Business.Content.Article.ArticleController error Incorrect string value: '\xF0\x9F\x8F\xA1</...' for column 'Content' at row 1
Incorrect string value: '\xF0\x9F\x8F\xA1</...' for column 'Content' at row 1
at FreeSql.Internal.CommonProvider.AdoProvider.LoggerException(IObjectPool
1 pool, PrepareCommandResult pc, Exception ex, DateTime dt, StringBuilder logtxt, Boolean isThrowException) at FreeSql.Internal.CommonProvider.AdoProvider.ExecuteNonQueryAsync(DbConnection connection, DbTransaction transaction, CommandType cmdType, String cmdText, Int32 cmdTimeout, Func
2 cmdAfterHandler, DbParameter[] cmdParms, CancellationToken cancellationToken)at FreeSql.Internal.CommonProvider.UpdateProvider
1.<>c__DisplayClass68_0.<<RawExecuteAffrowsAsync>b__0>d.MoveNext() --- End of stack trace from previous location --- at FreeSql.Internal.CommonProvider.UpdateProvider
1.ToSqlFetchAsync(Func2 fetchAsync) at FreeSql.Internal.CommonProvider.UpdateProvider
1.RawExecuteAffrowsAsync(CancellationToken cancellationToken)at FreeSql.Internal.CommonProvider.UpdateProvider
1.<>c__DisplayClass66_0.<<SplitExecuteAffrowsAsync>b__0>d.MoveNext() --- End of stack trace from previous location --- at FreeSql.Internal.CommonProvider.UpdateProvider
1.SplitExecuteAsync(Int32 valuesLimit, Int32 parameterLimit, String traceName, Func1 executeAsync, CancellationToken cancellationToken) at FreeSql.Internal.CommonProvider.UpdateProvider
1.SplitExecuteAffrowsAsync(Int32 valuesLimit, Int32 parameterLimit, CancellationToken cancellationToken)at FreeSql.DbSet`1.DbContextBatchUpdatePrivAsync(EntityState[] ups, Boolean isLiveUpdate, CancellationToken cancellationToken)
at FreeSql.DbContext.<>c__DisplayClass62_0.<g__funcUpdate|3>d.MoveNext()
The text was updated successfully, but these errors were encountered: