Repository: flutter
Issue: When resolving images, consider normalizing names and paths before comparing them
Labels: tool,P3,team-tool,triaged-tool

This issue summarizes #111020.

## Context
In some languages, identical words can be encoded in multiple ways. For example, the Korean word `사진` can be composed of two Hangul syllable blocks, `사` and `진`. In addition, it can be decomposed further into Hangul jamos, `ᄉ`, `ᅡ`, `ᄌ`, `ᅵ`, `ᆫ`. [See this comment from #111020 if these characters are not rendering properly for you](https://github.com/flutter/flutter/issues/111020#issuecomment-1251657144).

Given a file `assets/사진.jpeg` and an `Image` widget with a name of `assets/사진.jpeg`, it's possible that the image can't be resolved and an error will be thrown, even if the paths appear identical (and are indeed [unicode equivalent](https://en.wikipedia.org/wiki/Unicode_equivalence)).

## Steps to Reproduce

This [Flutter project (GitHub)](https://github.com/andrewkolos/flutter_issue_repros/tree/main/simple_asset_issues) reproduces the issue.

<details>
<summary> Demo (Android API 33) </summary>

This screen tries to render a single image with a path of `assets/사진.jpeg`, but is unable to because the the symbols are not composed into characters.

![This screen tries to render a single image with a path of `assets/사진.jpeg`, but is unable to because the the symbols are not composed into characters.](https://user-images.githubusercontent.com/9027551/194176657-dc7dfc20-8443-48f0-9f5f-e12dddeaae9f.png)

</details>

<details>
  <summary>Stack Trace</summary>

```
Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
✓  Built build/app/outputs/flutter-apk/app-debug.apk.
Connecting to VM Service at ws://127.0.0.1:52829/n6A5J2hk2kU=/ws
E/SurfaceSyncer( 4101): Failed to find sync for id=0
W/Parcel  ( 4101): Expecting binder but got null!
D/EGL_emulation( 4101): app_time_stats: avg=1468.71ms min=2.66ms max=4231.11ms count=3
══╡ EXCEPTION CAUGHT BY IMAGE RESOURCE SERVICE ╞════════════════════════════════════════════════════
The following assertion was thrown resolving an image codec:
Unable to load asset: assets/사진.jpeg.

When the exception was thrown, this was the stack:
#0      PlatformAssetBundle.loadBuffer (package:flutter/src/services/asset_bundle.dart:288:7)
package:flutter/src/services/asset_bundle.dart:288
#1      AssetBundleImageProvider._loadAsync (package:flutter/src/painting/image_provider.dart:731:35)
package:flutter/src/painting/image_provider.dart:731
#2      AssetBundleImageProvider.loadBuffer (package:flutter/src/painting/image_provider.dart:695:14)
package:flutter/src/painting/image_provider.dart:695
#3      ImageProvider.resolveStreamForKey.<anonymous closure> (package:flutter/src/painting/image_provider.dart:513:13)
package:flutter/src/painting/image_provider.dart:513
#4      ImageCache.putIfAbsent (package:flutter/src/painting/image_cache.dart:384:22)
package:flutter/src/painting/image_cache.dart:384
#5      ImageProvider.resolveStreamForKey (package:flutter/src/painting/image_provider.dart:511:81)
package:flutter/src/painting/image_provider.dart:511
#6      ScrollAwareImageProvider.resolveStreamForKey (package:flutter/src/widgets/scroll_aware_image_provider.dart:106:19)
package:flutter/src/widgets/scroll_aware_image_provider.dart:106
#7      ImageProvider.resolve.<anonymous closure> (package:flutter/src/painting/image_provider.dart:358:9)
package:flutter/src/painting/image_provider.dart:358
#8      ImageProvider._createErrorHandlerAndKey.<anonymous closure> (package:flutter/src/painting/image_provider.dart:473:24)
package:flutter/src/painting/image_provider.dart:473
<asynchronous suspension>

Image provider: AssetImage(bundle: null, name: "assets/사진.jpeg")
Image key: AssetBundleImageKey(bundle: PlatformAssetBundle#7001e(), name: "assets/사진.jpeg",
  scale: 1.0)
════════════════════════════════════════════════════════════════════════════════════════════════════
D/EGL_emulation( 4101): app_time_stats: avg=2712.92ms min=2712.92ms max=2712.92ms count=1
```
</details>

<details>
<summary> flutter doctor -v </summary>

```
[!] Flutter (Channel add-asset-manifest-parsing-benchmark, 3.4.0-37.0.pre.19, on macOS 12.6 21G115 darwin-arm64, locale en)
    • Flutter version 3.4.0-37.0.pre.19 on channel add-asset-manifest-parsing-benchmark at /Users/andrewkolos/Documents/GitHub/flutter
    ! Upstream repository https://github.com/andrewkolos/flutter.git is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to https://github.com/andrewkolos/flutter.git to dismiss this error.
    • Framework revision f9ca1142cb (23 hours ago), 2022-10-04 11:44:14 -0700
    • Engine revision 78a201fccf
    • Dart version 2.19.0 (build 2.19.0-266.0.dev)
    • DevTools version 2.17.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/andrewkolos/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 13.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 13F100
    ✗ CocoaPods installed but not working.
        You appear to have CocoaPods installed but it is not working.
        This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
        This can usually be fixed by re-installing CocoaPods.
      To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.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 11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.71.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.48.0

[✓] Connected device (3 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64  • Android 13 (API 33) (emulator)
    • macOS (desktop)             • macos         • darwin-arm64   • macOS 12.6 21G115 darwin-arm64
    • Chrome (web)                • chrome        • web-javascript • Google Chrome 106.0.5249.91

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 2 categories.
```

</details>