Repository: flutter
Issue: Hebrew characters are considered as invalid numeric values in text field
Labels: a: text input,a: internationalization,a: typography,P2,team-engine,triaged-engine,from: manual-qa

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

1. Add the keyboard Hebrew in your iPhone (14 Pro - iOS 16.6) or Android (Pixel 6 - Android 13)
2. Go to any app that includes text field widget provided in the code section (similar to https://gallery.flutter.dev/#/demo/text-field )
3. Go to the multiple lines field 
4. Type a hebrew character and check the log

### Expected results

None errors should be returned on the log

### Actual results

Following error is logged:
`myappios[469:10861] [Unknown process name] Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API and this value is being ignored. Please fix this problem.`

### Code sample

<details><summary>Code sample</summary>

This is the widget I’m using in Flutter:
```
class MaterialTextFieldView extends StatelessWidget {
  const MaterialTextFieldView({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: const Text('Text fields'),
      ),
      body: const SingleChildScrollView(
        padding: EdgeInsets.symmetric(
          horizontal: 24,
          vertical: 16,
        ),
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            TextField(
              decoration: InputDecoration(
                labelText: 'Left to right',
              ),
            ),
            SizedBox(height: 48),
            TextField(
              decoration: InputDecoration(
                labelText: 'Right to left',
              ),
              textDirection: TextDirection.rtl,
            ),
            SizedBox(height: 48),
            TextField(
              maxLines: 2,
              decoration: InputDecoration(labelText: 'Max lines (2)'),
              textDirection: TextDirection.ltr,
            ),
            SizedBox(height: 48),
            PasswordTextField(),
            SizedBox(height: 48),
            PhoneNumberTextField(),
            SizedBox(height: 48),
          ],
        ),
      ),
    );
  }
}
```

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

https://github.com/flutter/flutter/assets/11681325/fc8b32b7-44e7-4b11-877b-1c06eb2932d7

</details>


### Logs

<details><summary>Logs</summary>

```console
myappios[469:10861] [Unknown process name] Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API and this value is being ignored. Please fix this problem.
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[✓] Flutter (Channel master, 3.14.0-14.0.pre.93, on macOS 13.5 22G74 darwin-arm64, locale en-US)
    • Flutter version 3.14.0-14.0.pre.93 on channel master at /Users/diegogawenda/fvm/versions/master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ef9befc9da (3 days ago), 2023-09-03 11:23:20 -0700
    • Engine revision fbc6f4a540
    • Dart version 3.2.0 (build 3.2.0-131.0.dev)
    • DevTools version 2.27.0

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/diegogawenda/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/diegogawenda/Library/Android/sdk
    • ANDROID_SDK_ROOT = /Users/diegogawenda/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] VS Code (version 1.80.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.70.0

[✓] Connected device (3 available)
    • Somnio’s iPhone (mobile) • 00008120-001168D83C87C01E • ios            • iOS 16.6 20G75
    • macOS (desktop)          • macos                     • darwin-arm64   • macOS 13.5 22G74 darwin-arm64
    • Chrome (web)             • chrome                    • web-javascript • Google Chrome 116.0.5845.179

[✓] Network resources
    • All expected network resources are available.

```

</details>