# How to use special characters in .m file?

I ran into a strange problem with a function that I want to include in a package file (.m):

Cleanup[data_] := data /. (\[Placeholder] -> Missing[])


When I define this function in a notebook, and call it with some placeholders in the argument, they are replaced correctly. However, if I define this function in my package .m file, load the package, and call the function, the placeholders are not replaced. The package is automatically generated from a .nb file when saved, but the generated .m file looks ok, and manually editing doesn't help either...

An example for data would be

Cleanup[{{a, \[Placeholder]}, {b, \[Placeholder]}}]


This works fine if Cleanup is defined in a simple notebook, but if it's loaded from a .m package, nothing is replaced.

Mathematica 10.0, Win7 x64

• Can you give us an example of the data you are trying to replace too? Is data always a list? – MarcoB Aug 11 '15 at 15:46
• @MarcoB I added some example data - I'm using this on data tables entered in MatrixForm... – mjayvizzle Aug 11 '15 at 17:52
• It's working ok for me when saved in a package. 10.2.0, Mac OS X x86 (64-bit) – Simon Rochester Aug 11 '15 at 18:48

Global\[Placeholder]

when used in a package (after BeginPackage`).