Consider not using emojis in `print`, which encounterred encoding error.
Author: acane77
Pull request: no
Labels: name: bug

### System Info

transformer version: latest commit

in file: https://github.com/huggingface/transformers/blob/main/src/transformers/utils/auto_docstring.py#L1121  (and any other files using emoji symbols)

This "🚨" symbol cause encoding error as the system charset is not UTF-8 encoded. (especially on Windows, the UTF-8 charset support is default disabled, instead the system charset is GBK, cp1252, etc)

For compatibility, it's better to not use such non-ASCII, UTF-8 charset dependent multi-word emojis.

### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

On windows system without UTF-8 charset enabled, run code to reach any print statement containing emoji characters. like "🚨"

### Expected behavior

Program crashed with the following error message.

```
[6424] [8464]   File "transformers\models\bert\modeling_bert.py", line 778, in <module>
[6424] [8464]   File "transformers\utils\auto_docstring.py", line 2048, in auto_docstring
[6424] [8464]   File "transformers\utils\auto_docstring.py", line 2045, in auto_docstring_decorator
[6424] [8464]   File "transformers\utils\auto_docstring.py", line 1787, in auto_class_docstring
[6424] [8464]   File "transformers\utils\auto_docstring.py", line 1728, in auto_method_docstring
[6424] [8464]   File "transformers\utils\auto_docstring.py", line 1243, in _get_model_info
[6424] [8464]   File "transformers\utils\auto_docstring.py", line 1124, in get_model_name
[6424] [8464]   File "encodings\cp1252.py", line 19, in encode
[6424] [8464] UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f6a8' in position 0: character maps to <undefined>

```

Comments:
Yes, agreed. Would you be willing to make a PR to get rid of that?

Hi @Rocketknight1 

I was interested in contributing to something open source and thought this issue might be a manageable start.

I ran:

`rg -n "🚨|⚠️|💡|🔥" --iglob "*.py" > emoji_hits.txt`

and found 18 references to print statements (555 references overall, including markdown, docstrings, etc)

Before I start the PR, could I please confirm the intended scope?

**Proposal**

- Remove emojis from any messages printed or logged at runtime 
  - (e.g., print, logging.*, exceptions, CLI output)

- Replace with ASCII text equivalents:

  - 🚨 → [ERROR]
  - ⚠️ → [WARNING]
  - 💡 → [INFO]
  - 🔥 → [MATCH]
  - 💩 → [FAIL]

- Leave emojis in comments, Markdown docs, and Jupyter notebooks

**Example**

From: `print("Do both models output the same tensors?", "🔥" if success else "💩")`

To:  `print("Do both models output the same tensors?", "[OK]" if success else "[FAIL]")`

If this approach sounds good, could this issue be assigned to me? Happy to adjust anything based on your preference!

Thanks!

Hi @7amim, yes, I think your proposal sounds good! They should of course be left in Markdown etc, but any statement that prints to the console should probably not contain emojis if that code fails on most Windows machines.

We don't do issue assignment here, but feel free to make a PR!

> Hi [@7amim](https://github.com/7amim), yes, I think your proposal sounds good! They should of course be left in Markdown etc, but any statement that prints to the console should probably not contain emojis if that code fails on most Windows machines.
> 
> We don't do issue assignment here, but feel free to make a PR!

Sounds good @Rocketknight1 , thanks for the guidance! Just one more clarification question:

There are dozens of runtime-visible messages across multiple modules (including some in argparse help= text). To keep the review manageable, would you prefer that I:

a) Submit everything in one PR (for ease of tracking the entire change), or
b) Split into a few smaller PRs, grouped logically (for example: CLI/argparse changes in one, core library print/logging in another)

I’m happy to follow whichever structure you’d find most convenient- just let me know what you prefer!

Thanks again :)

One big PR is probably easier!