> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/ar/qaadh-almarfh/151-what-file-encodings-and-line-endings-should-i-use.md).

# ما ترميزات الملفات ونهايات الأسطر التي ينبغي أن أستخدمها؟

## الترميز

يستخدم Overleaf [UTF-8](https://en.wikipedia.org/wiki/UTF-8) ترميزًا لجميع ملفات النصوص. يُعد UTF-8 أكثر ترميزات الأحرف استخدامًا على الويب اليوم. يمكنك استخدامه لتمثيل أي حرف يونيكود، بما في ذلك مجموعة هائلة ومتنوعة من الحروف والأرقام والرموز، بما فيها الحروف اليونانية والحروف ذات العلامات.

يتفوق UTF-8 على العديد من الترميزات الأقدم، مثل latin1 وlatin9، والتي توجد غالبًا في ملفات وقوالب LaTeX. يسبق TeX وLaTeX ظهور UTF-8 بعقود عدة، لذا فإن دعم LaTeX لـ UTF-8 غير متسق إلى حد ما ويعتمد على أيّ [محرك TeX](/latex/ar/mqalat-mtamqh/55-what-s-in-a-name-a-guide-to-the-many-flavours-of-tex.md) تستخدمه.

### الدعم مع LaTeX وpdfLaTeX

إذا كنت تستخدم pdfLaTeX (أي تشغيل LaTeX باستخدام محرك pdfTeX)، وهو الإعداد الافتراضي في Overleaf، فيمكنك تنضيد معظم الحروف ذات العلامات وبعض الرموز مباشرةً إذا أضفت أمر \usepackage هذا في مقدمة مستندك:

```latex
\usepackage[utf8]{inputenc}
```

يجب أن يكون هذا هو سطر inputenc الوحيد في المقدمة، لذا ينبغي أن يحل محل أي سطر آخر يستخدم ترميزات مختلفة.

ومع ذلك، لا يعرف TeX كيفية تنضيد جميع أحرف UTF-8. قد يظهر لك خطأ مثل هذا إذا لم يكن يعرف كيفية تنضيد الحرف الخاص بك:

```latex
Package inputenc Error: Unicode char \u8:��� not set up for use with LaTeX.
```

يمكن لمحرك TeX أحدث، مثل XeLaTeX أو LuaLaTeX، دعم مثل هذه أحرف يونيكود بشكلٍ أصيل.

### الدعم مع XeLaTeX أو LuaLaTeX

إذا كنت تستخدم أحد محركات LaTeX الأحدث هذه، فيمكنك استخدام قدر أكبر بكثير من UTF-8 مباشرةً. يمكنك [اختيار المحرك في Overleaf](/latex/ar/mzyd-mn-almwdhwaat/08-choosing-a-latex-compiler.md) بالنقر على أيقونة قائمة Overleaf أعلى لوحة قائمة ملفات مشروعك.

### أحرف غير صالحة/غير مدعومة

لأسباب تقنية، لا يستطيع Overleaf تخزين الملفات التي تحتوي على [أحرف NUL](https://en.wikipedia.org/wiki/Null_character) أو الملفات التي تحتوي على أحرف من خارج [المستوى الأساسي متعدد اللغات](https://en.wikipedia.org/wiki/Plane_\(Unicode\))مجال اليونيكود الأساسي (BMP). يحتوي BMP فقط على أول 65,536 نقطة ترميز يونيكود. بعض الرموز الرياضية اليونيكودية وبعض الرموز من اللغات الشرقية تقع خارج BMP. وقد تظهر الرموز الرياضية خارج BMP أحيانًا عند النسخ من ملفات PDF إلى صفحات الويب.

أفضل حل بديل هو استبدال أحرف خارج BMP بأوامر LaTeX مكافئة، مثلًا بدلًا من كتابة أو لصق [𝛼 (U+1D6FC MATHEMATICAL ITALIC SMALL ALPHA)](https://www.fileformat.info/info/unicode/char/1d6fc/index.htm)، اكتب بدلًا من ذلك `$\alpha$`. [Detexify](http://detexify.kirelabs.org/classify.html) أداة مفيدة للعثور على أمر LaTeX المطابق لرمز معيّن.

بالنسبة إلى الرموز التعبيرية، يمكنك استخدام `\symbol` الأمر بالتزامن مع `fontspec`، وXeLaTeX، وخط مناسب. على سبيل المثال:

```latex
أوراق متساقطة: {\fontspec{Symbola}\symbol{"1F343}}
```

![Emoji-symbola-falling-leaves.png](/files/93e32e7c90156dc5250b48f7e4eaf169e73f3452)

إذا أردت استخدام الرموز التعبيرية الملوّنة، فقد ترغب في إلقاء نظرة على [الرموز التعبيرية](http://texdoc.net/pkg/emoji) الحزمة. ستحتاج إلى [تغيير مُصرّف مشروعك](/latex/ar/qaadh-almarfh/026-changing-compiler.md) إلى LuaLaTeX. عندها يمكنك تحميل `الرموز التعبيرية` الحزمة، وكتابة `\emoji{leaves}`.

![Colour-emojis.png](/files/ec3144f64f46e4127ea517b20bfa66db0e475f15)

يمكن العثور على مزيد من المعلومات حول استخدام الرموز التعبيرية مع LaTeX في المقال [إدراج الرموز التعبيرية في مستندات LaTeX على Overleaf](/latex/ar/alaselh-walajwbh/75-inserting-emojis-in-latex-documents-on-overleaf.md).

## نهايات الأسطر

يستخدم Overleaf نهايات أسطر بأسلوب Unix، ‎\n (LF)، بدلًا من نهايات الأسطر بأسلوب Microsoft Windows، ‎\r\n (CRLF).

إذا كنت تستخدم [واجهة git](https://www.overleaf.com/blog/195) لتعديل مشاريعك على Overleaf، فيمكنك استخدام نهايات الأسطر المحلية في نظامك وجعل git يحولها إلى نهايات أسطر Unix لك عن طريق [تمكين إعداد autocrlf في git](https://help.github.com/articles/dealing-with-line-endings).

قد يهمك أيضًا [هذه المقالة](/latex/ar/mqalat-mtamqh/05-an-introduction-to-endlinechar-how-tex-reads-lines-from-text-files.md) حول كيفية التعامل مع نهايات الأسطر بواسطة معالج TeX.

## مقالات المساعدة ذات الصلة

* [كيف أستخدم الحروف ذات العلامات (مثلًا في الفرنسية أو البرتغالية)؟](/latex/ar/alaselh-walajwbh/37-how-do-i-use-letters-with-accents-e.g.-in-french-or-portuguese.md)
* [التنضيد متعدد اللغات على Overleaf باستخدام polyglossia وfontspec](/latex/ar/allghat/01-multilingual-typesetting-on-overleaf-using-polyglossia-and-fontspec.md)
* [مقدمة إلى \endlinechar: كيف يقرأ TeX الأسطر من الملفات النصية](/latex/ar/mqalat-mtamqh/05-an-introduction-to-endlinechar-how-tex-reads-lines-from-text-files.md)
* [إدراج الرموز التعبيرية في مستندات LaTeX على Overleaf](/latex/ar/alaselh-walajwbh/75-inserting-emojis-in-latex-documents-on-overleaf.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/ar/qaadh-almarfh/151-what-file-encodings-and-line-endings-should-i-use.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
