Our teacher, the Rema, wrote in section 10 (Shulchan Aruch Yoreh Deah 276:10): Similarly, Aleph-Dalet from "Adonai" or Aleph-Heh from "Ehyeh" may be erased. And there are those who are stringent in this. Thus far his words. And this is the opinion of the Tosafot in Shevuot there, that even though this is not a name in its own right – they did not act leniently in this, because it is from the Unique Name. And they wrote this only regarding Aleph-Dalet, see there. And our teacher, the Rema, inferred from this also regarding Aleph-Heh, because "Ehyeh" is also thus, meaning from the Unique Names, as is known to the scholars of truth that these three names, Havayah and "Adonai" and "Ehyeh," are the primary Unique Names, and they include from the beginning of levels until the end of all levels. And it is impossible to elaborate on this. (So it appears to me. And the words of the Taz, sub-section 9, and the words of the Levush require further study. And be precise and you will find it easy.) He further wrote that the name written in prayer books, two yuds and one above them – it is permitted to erase it if it is for a need. Thus far his words. And in our editions it is printed with two yuds, and the law is also thus, as is understood. And it is explained that without a great need one should not erase them (see Shach, sub-section 14). And it appears to me that there is no difference in the law of erasing names between whether it was written in Ashurit script or in other types of scripts, for since it was written in the Holy Tongue for the sake of sanctity – it is holy. And if one wrote the name in other foreign languages, not in the Holy Tongue, the Tashbetz wrote (siman 2) that their law is like kinnuyim, and it is permitted to erase them for a need (and so wrote the Shach in siman 179, sub-section 11). And there is one who is in doubt that perhaps if he wrote in Ashurit script, and wrote it with intent, that one should be stringent (Chavat Yair). And women and the common folk who write the name of Hashem in the German language in letters, although they possess no sanctity, nevertheless there is a prohibition in the matter as they come to disgrace in bathrooms. And you have no disgrace greater than this, and one must prevent them from this. And many great ones cried out about this, and we explained this in Choshen Mishpat siman 27, see there.
וכתב רבינו הרמ"א בסעיף י (שולחן ערוך יורה דעה רעו, י): וכן א"ד מ"אדני" או א"ה מ"אקיה" נמחק. ויש מחמירין בזה. עד כאן לשונו. וזהו דעת התוספות בשבועות שם, דאף על גב דאין זה שם בפני עצמו – לא הקילו בזה, מפני שהוא משם המיוחד. וכתבו זה רק על א"ד, עיין שם. ורבינו הרמ"א דן מזה גם על א"ה, מפני ש"אקיה" גם כן כן, כלומר מן השמות המיוחדין, כידוע לחכמי אמת שאלו השלושה שמות הוי"ה ו"אדני" ו"אקיה" הם עיקרי השמות המיוחדין, וכוללין מריש דרגין עד סוף כל דרגין. ואי אפשר להאריך בזה. (כן נראה לי. ודברי הט"ז סעיף קטן ט, ודברי הלבוש צריכים עיון. ודייק ותמצא קל.) עוד כתב דהשם שכותבין בסידורים, שתי יודי"ן ואחת על גביהן – מותר למוחקו אם הוא לצורך. עד כאן לשונו. ואצלינו נדפס בשני יודין, וגם כן הדין כן כמובן. ומבואר דשלא לצורך גדול אין למוחקן (עיין ש"ך סעיף קטן י"ד). ויראה לי דאין חילוק בדין מחיקת שמות, בין נכתב בכתב אשורית ובין בשארי מיני כתבים, דכיון שנכתב בלשון הקודש לשם קדושה – הוי קדוש. ואם כתב השם בשארי לשונות לע"ז שלא בלשון הקודש, כתב התשב"ץ (סימן ב') דדינם ככינוים, ומותר למוחקן לצורך (וכן כתב הש"ך בסימן קע"ט סעיף קטן י"א). ויש שמסתפק דאולי אם כתב בכתב אשורית, וכתבו בכוונה, דיש להחמיר (חו"י). ונשים ועמי הארץ שכותבים במכתבים שם ה' בלשון אשכנז, אם כי אין בהם קדושה, מכל מקום יש איסור בדבר שבאים לידי בזיון בבתי מחראות. ואין לך בזיון גדול מזה, ויש למונען מזה. וכמה גדולים צווחו על זה, ובארנו זה בחושן משפט סימן כ"ז, עיין שם.