third_party/icu/data missing big-endian conversion data files
Hi @jonathan-albrecht-ibm ,

Could you please confirm the bazel command you have used for the tests?  Thankyou! Hi @SuryanarayanaY, here is the bazel command I used that will run the failed tests:

```bash
TF_SYSTEM_LIBS="boringssl" bazel --host_jvm_args="-Xms1024m" --host_jvm_args="-Xmx2048m" test --build_tests_only --build_event_json_file=../logs/bazel-build-events-unicode.json --define=tflite_with_xnnpack=false -- //tensorflow/python/kernel_tests/strings_ops:unicode_decode_op_test //tensorflow/python/kernel_tests/strings_ops:unicode_transcode_op_test
```

Note that when building on s390x, there are some extra changes required for ssl (`TF_SYSTEM_LIBS="boringssl"`) and xnnpack (`--define=tflite_with_xnnpack=false` since not available on s390x) that are unrelated to the unicode tests.

I've dug into it a bit more and I'll add some more info in a follow up comment. Hi @SuryanarayanaY,

Following the instructions in https://github.com/tensorflow/tensorflow/blob/6537d7f689b234c7f945fe3b5d094317716148b0/third_party/icu/data/BUILD.bazel#L16-L43 I was able to generate the big-endian format files on a little-endian x86_64 VM with icu version release-69-1.

After creating icudt69l_dat.c:

* generate the big-endian .dat file with `icupkg -tb ./icudt69l.dat icudt69b.dat`
* generate the big-endian icudt69b_dat.c file with `genccode icudt69b.dat`
* add the conversion wrapper function with `echo "U_CAPI const void * U_EXPORT2 uprv_getICUData_conversion() { return icudt69b_dat.bytes; }" >> icudt69b_dat.c`

Then the icudt69b_dat.c can be gzip'd and split to a set of eg. icu_conversion_data_big_endian.c.gz.* files.

The `conversion_files` filegroup (https://github.com/tensorflow/tensorflow/blob/6537d7f689b234c7f945fe3b5d094317716148b0/third_party/icu/data/BUILD.bazel#L44-L47) can also be updated to select the big-endian files on s390x. Something like this:

```bazel
filegroup(
    name = "conversion_files",
    srcs = select({
        "@org_tensorflow//tensorflow:linux_s390x": glob(["icu_conversion_data_big_endian.c.gz.*"]),
        "//conditions:default": glob(["icu_conversion_data.c.gz.*"]),
    }),
)
```

With those changes in place, the unicode tests all pass and I didn't see any regressions in other tests when running the full test suite. Hi, Could you please check the comment on the above linked PR and explain on handling big-endian conversion( which is solved in your case). H @sachinprasadhs, Thanks for helping with this. 

Your PR also needs to include the big-endian conversion which can be generated from the little-endian .dat file. My comment above (https://github.com/tensorflow/tensorflow/issues/59935#issuecomment-1466304945) explains how to do that:

You will need to follow all of the existing instructions to generate the little-endian conversion files in: https://github.com/tensorflow/tensorflow/blob/6537d7f689b234c7f945fe3b5d094317716148b0/third_party/icu/data/BUILD.bazel#L16-L43

then follow these instructions to generate the big-endian conversion files.

> After creating icudt69l_dat.c:
> 
> * generate the big-endian .dat file with `icupkg -tb ./icudt69l.dat icudt69b.dat`
> * generate the big-endian icudt69b_dat.c file with `genccode icudt69b.dat`
> * add the conversion wrapper function with `echo "U_CAPI const void * U_EXPORT2 uprv_getICUData_conversion() { return icudt69b_dat.bytes; }" >> icudt69b_dat.c`
> 
> Then the icudt69b_dat.c can be gzip'd and split to a set of eg. icu_conversion_data_big_endian.c.gz.* files.
> 

Finally the new big-endian conversion files will need to be included in your PR.

Let me know if you have any questions and I will try to help. Thanks for pointing me to the details, would you be interested to work on this PR, since you already have the workflow ready. I can go ahead and close the PR.
 Hi @sachinprasadhs, I'll need to get internal approval on my side before I can submit a PR and it could take some time. I appreciate your time looking at this. If you are still interested I could work with you to help you generate the big-endian files otherwise I will try to get approval to create a PR. Yes please, I would need your help in making this PR, since I have limited knowledge on this topic. Thanks for offering to help @sachinprasadhs! The first step would be to generate the little-endian data file using the instructions at: https://github.com/tensorflow/tensorflow/blob/6537d7f689b234c7f945fe3b5d094317716148b0/third_party/icu/data/BUILD.bazel#L16-L43

If you have any specific questions I'd be happy to help. @nitins17 , Can you take a look into this request or help me connecting with the right person who can look into it. Thanks! Hi @nitins17, would you have some time to look into this issue? I probably won't be able to get internal approval to submit a PR for some time. Thanks for flagging this issue and sorry about the late reply! Unfortunately, I do not have familiarity with the failing tests so I don't think I can review your PR.

@rohan100jain Do you think someone from your team would be a better fit to review this?



 @mihaimaruseac hope you don't mind my reaching out directly but from looking at the git history, I think you might be able to help with this `third_party/icu` issue.

Due to internal reasons, I'm not going to be able to open a PR for this anytime soon. I figured out how to generate the big-endian format data files on amd64 and added the [details above](https://github.com/tensorflow/tensorflow/issues/59935#issuecomment-1466304945).

Would generating the big-endian data files and adding them into `third_party/icu/data` be something you would have time to do? Any help would be greatly appreciated but I certainly understand if time or other reasons won't allow. Unfortunately I not longer work in TF (left the team nearly a year ago). I am consulting from time to time (especially on security topics, but also on OSS), and might contribute here and there with some PRs, but my main bulk of work is no longer in TF. So it will take some time until I can handle this. Thanks @mihaimaruseac, I appreciate it! I'm starting to think that the solution here might be to just generate the conversion files at build time, instead of storing them in the repo. There are several requirements that could be pushing towards that @mihaimaruseac generating the conversion files at build time would help this issue. It's straight forward to generate the big endian version of the conversion files, once all the setup of the icu build is in place, on either big or little endian machines.  Adding @MichaelHudgins for visibility Thanks for the ping @mihaimaruseac.  I think if we could move towards generation at build time instead of storing all of those conversion in third_party that would be best.
<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Build/Install

### Have you reproduced the bug with TF nightly?

Yes

### Source

source

### Tensorflow Version

tf 2.11

### Custom Code

Yes

### OS Platform and Distribution

Linux Ubuntu 20.04 s390x

### Mobile device

_No response_

### Python version

3.10

### Bazel version

5.3.0

### GCC/Compiler version

gcc 9

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current Behaviour?

```shell
Two of the unicode unit tests fail on s390x due to the icu_conversion_data.c.gz.* files being in little-endian format. 

Could big-endian formatted versions of the icu_conversion_data.c.gz.* files be added so that they can be selected when building on s390x?
```


### Standalone code to reproduce the issue

```shell
The unit tests:

* //tensorflow/python/kernel_tests/strings_ops:unicode_decode_op_test
* //tensorflow/python/kernel_tests/strings_ops:unicode_transcode_op_test

fail on s390x.
```


### Relevant log output

```shell
======================================================================
ERROR: testDecodeWithDifferentEncodings5 ('SHIFT-JIS', ['Hello', 'こんにちは']) (__main__.UnicodeDecodeTest)
UnicodeDecodeTest.testDecodeWithDifferentEncodings5 ('SHIFT-JIS', ['Hello', 'こんにちは'])
testDecodeWithDifferentEncodings('SHIFT-JIS', ['Hello', 'こんにちは'])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jalbrecht/.cache/bazel/_bazel_jalbrecht/d88fb95a52e214eb99836e3d1a65a951/execroot/org_tensorflow/bazel-out/s390x-opt/bin/tensorflow/python/kernel_tests/strings_ops/unicode_decode_op_test.runfiles/org_tensorflow/tensorflow/python/client/session.py", line 1378, in _do_call
    return fn(*args)
  File "/home/jalbrecht/.cache/bazel/_bazel_jalbrecht/d88fb95a52e214eb99836e3d1a65a951/execroot/org_tensorflow/bazel-out/s390x-opt/bin/tensorflow/python/kernel_tests/strings_ops/unicode_decode_op_test.runfiles/org_tensorflow/tensorflow/python/client/session.py", line 1361, in _run_fn
    return self._call_tf_sessionrun(options, feed_dict, fetch_list,
  File "/home/jalbrecht/.cache/bazel/_bazel_jalbrecht/d88fb95a52e214eb99836e3d1a65a951/execroot/org_tensorflow/bazel-out/s390x-opt/bin/tensorflow/python/kernel_tests/strings_ops/unicode_decode_op_test.runfiles/org_tensorflow/tensorflow/python/client/session.py", line 1454, in _call_tf_sessionrun
    return tf_session.TF_SessionRun_wrapper(self._session, options, feed_dict,
tensorflow.python.framework.errors_impl.InvalidArgumentError: Could not create converter for input encoding: SHIFT-JIS
         [[{{node UnicodeDecode/UnicodeDecode}}]]
```
</details>