@@ -1247,7 +1247,7 @@ protected void WriteRawParameter(IXdrWriter xdr, DbField field)
12471247 else
12481248 {
12491249 var svalue = field . DbValue . GetString ( ) ;
1250- if ( ( field . Length % field . Charset . BytesPerCharacter ) == 0 && svalue . EnumerateRunesToChars ( ) . Count ( ) > field . CharCount )
1250+ if ( ( field . Length % field . Charset . BytesPerCharacter ) == 0 && svalue . CountRunes ( ) > field . CharCount )
12511251 {
12521252 throw IscException . ForErrorCodes ( new [ ] { IscCodes . isc_arith_except , IscCodes . isc_string_truncation } ) ;
12531253 }
@@ -1272,7 +1272,7 @@ protected void WriteRawParameter(IXdrWriter xdr, DbField field)
12721272 else
12731273 {
12741274 var svalue = field . DbValue . GetString ( ) ;
1275- if ( ( field . Length % field . Charset . BytesPerCharacter ) == 0 && svalue . EnumerateRunesToChars ( ) . Count ( ) > field . CharCount )
1275+ if ( ( field . Length % field . Charset . BytesPerCharacter ) == 0 && svalue . CountRunes ( ) > field . CharCount )
12761276 {
12771277 throw IscException . ForErrorCodes ( new [ ] { IscCodes . isc_arith_except , IscCodes . isc_string_truncation } ) ;
12781278 }
@@ -1395,7 +1395,7 @@ protected async ValueTask WriteRawParameterAsync(IXdrWriter xdr, DbField field,
13951395 else
13961396 {
13971397 var svalue = await field . DbValue . GetStringAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
1398- if ( ( field . Length % field . Charset . BytesPerCharacter ) == 0 && svalue . EnumerateRunesToChars ( ) . Count ( ) > field . CharCount )
1398+ if ( ( field . Length % field . Charset . BytesPerCharacter ) == 0 && svalue . CountRunes ( ) > field . CharCount )
13991399 {
14001400 throw IscException . ForErrorCodes ( new [ ] { IscCodes . isc_arith_except , IscCodes . isc_string_truncation } ) ;
14011401 }
@@ -1420,7 +1420,7 @@ protected async ValueTask WriteRawParameterAsync(IXdrWriter xdr, DbField field,
14201420 else
14211421 {
14221422 var svalue = await field . DbValue . GetStringAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
1423- if ( ( field . Length % field . Charset . BytesPerCharacter ) == 0 && svalue . EnumerateRunesToChars ( ) . Count ( ) > field . CharCount )
1423+ if ( ( field . Length % field . Charset . BytesPerCharacter ) == 0 && svalue . CountRunes ( ) > field . CharCount )
14241424 {
14251425 throw IscException . ForErrorCodes ( new [ ] { IscCodes . isc_arith_except , IscCodes . isc_string_truncation } ) ;
14261426 }
0 commit comments