0

I am creating a local project. I have a Word doc file with name "Maßnahme3" (these are German characters). I want to convert this to a PDF file and I am trying to do this by using the <cfdocument> tag. But ColdFusion is throwing the following error:

Invalid source C:\\Maßnahme3.doc specified

Anyone have an idea why this is not working?

4
  • have you tried c:\ ? Commented Oct 25, 2018 at 9:10
  • Yes I have tried "c:\"but not working. Commented Oct 25, 2018 at 10:55
  • 1
    What is the actual filename on disk? That character may be getting changed. Try running <cfdirectory action="list" directory="C:\" recurse="false" name="myList"> and then <cfdump var="#myList#"> to see what the filename looks like. Commented Oct 25, 2018 at 12:03
  • Please add the line of code that is causing the error. Commented Oct 25, 2018 at 12:37

1 Answer 1

1

Place the following 2 lines of code at the top of your ColdFusion page. They let ColdFusion know how to interprete the symbols.

<cfprocessingdirective pageEncoding="UTF-8"> <cfset setLocale("German (Standard)")> 
Sign up to request clarification or add additional context in comments.

2 Comments

Yes this solution worked for me. But can we set multiple locale. Suppose I have file with some chinese characters too then what will happen.
Locale implies, amongst others, language and notation. You can only use one at a time.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.