diff --git a/src/misc.cxx b/src/misc.cxx index fdacbd7..8c9d2e0 100644 --- a/src/misc.cxx +++ b/src/misc.cxx @@ -99,9 +99,14 @@ GetLocale () } bool -IsRightReading () +IsRightReading (const char * text) { - return GetLocale () == "he"; + auto isRight = false; + if (text) + isRight = strchr (text, 0xD7) != nullptr; + else + isRight = GetLocale () == "he"; + return isRight; } // Retourne le nom de dossier en cours. diff --git a/src/misc.h b/src/misc.h index 5518955..d3b7865 100644 --- a/src/misc.h +++ b/src/misc.h @@ -40,7 +40,7 @@ std::string GetBaseDir (); std::string GetShareDir (); std::string GetBinDir (); std::string GetLocale (); -bool IsRightReading (); +bool IsRightReading (const char * text = nullptr); extern void AddUserPath (std::string & pFilename); enum Location { LOCATION_ABSOLUTE, LOCATION_BASE, LOCATION_USER };