Casual LaTeX user here, so if something seems dumb/obvious, it probably is.
I'm want to use LaTeX (via pandoc) to create PDFs that contain hebrew characters.
I found this answer where someone appears to have solved a similar problem. However, when I create a utf-8 text file (working.tex) with the same content
\documentclass{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{hebrew}
\setmainfont{Times New Roman}
\newfontfamily{\hebrewfont}{New Peninim MT}
\begin{document}
\title{שלום עולם}
\author{שלום עולם}
\maketitle
העיר מקודשת ליהדות, לנצרות ולאסלאם, והיוותה מרכז חיי העם היהודי בימי
קדם ומושא געגועיו בזמן שהייתו בגלות. משום מרכזיותה בעולמם של המאמינים,
הייתה העיר מוקד למלחמות וסכסוכים הנמשכים עד עצם היום הזה. מאז סוף המאה
ה-19 התפתחו סביב העיר העתיקה שכונות העיר החדשה, המהוות כיום את רובה
המוחלט של העיר. במרכזה של ירושלים השלמה עומד הר הבית, שמפריד בין מערב
ירושלים למזרח ירושלים.
בשנת 1981 הוכרזה העיר העתיקה של ירושלים כאתר מורשת עולמית על ידי ארגון
אונסק"ו של האומות המאוחדות, והיא נמצאת ברשימת האתרים בסיכון.
\end{document}
and then use pandoc to convert that to a PDF
pandoc --latex-engine=xelatex working.tex -o working.pdf
and then open the PDF
I get zero hebrew characters.
Is there anything wrong with the above document? Are there common troubleshooting tips for getting hebrew working with LaTeX and pandoc?

.texfile. It should thus be directly compiled withxelatex. (Have you triedxelatex working.tex?) Another issue might come from the font. – ebosi Jun 17 '17 at 03:13\newfontfamily{\hebrewfont}{FreeSans}seems to have done it. Happy to marks your as the correct answer if you want to move it out of the comments. Also, and this may be beyond your remit -- do you have any idea why invoking xelatex directly vs. invoking pandoc with--latex-engine=xelatexwould produce different results, or how a newbie/casual user might start debugging/understanding that? – Alana Storm Jun 17 '17 at 04:46