Digital Developer Conference: a FREE half-day online conference focused on AI & Cloud – North America: Nov 2 – India: Nov 9 – Europe: Nov 14 – Asia Nov 23 Register now

Close outline
  • United States
IBM?
  • Site map
IBM?
  • Marketplace

  • Close
    Search
  • Sign in
    • Sign in
    • Register
  • IBM Navigation
IBM Developer Answers
  • Spaces
    • Blockchain
    • IBM Cloud platform
    • Internet of Things
    • Predictive Analytics
    • Watson
    • See all spaces
  • Tags
  • Users
  • Badges
  • FAQ
  • Help
Close

Name

Community

  • Learn
  • Develop
  • Connect

Discover IBM

  • ConnectMarketplace
  • Products
  • Services
  • Industries
  • Careers
  • Partners
  • Support
10.190.13.195

Refine your search by using the following advanced search options.

Criteria Usage
Questions with keyword1 or keyword2 keyword1 keyword2
Questions with a mandatory word, e.g. keyword2 keyword1 +keyword2
Questions excluding a word, e.g. keyword2 keyword1 -keyword2
Questions with keyword(s) and a specific tag keyword1 [tag1]
Questions with keyword(s) and either of two or more specific tags keyword1 [tag1] [tag2]
To search for all posts by a user or all posts with a specific tag, start typing and choose from the suggestion list. Do not use a plus or minus sign with a tag, e.g., +[tag1].
  • Ask a question

Issue with encoding characters during checkout operation in ICN

50VR3M0JQ0 gravatar image
Question by ICNDeveloper  (24) | Aug 16, 2018 at 03:02 AM ecmsupporticnfileneticn2.0.3

Greetings

I have written a responseFilter on "/p8/getDocument" service. When document action is performed, I am fetching the document and then using the RetrievalName from the content elements. I am using this RetrievalName for the FileName. I am also encoding the filename as per the UTF-8 standard to handle the special characters and german characters. Below is the code that I used to encode it :

 String filename=URLEncode.encode(document.get_Name + fileExt, "UTF-8").replace("+"," ");
 response.setHeader("content-disposition",MessageFormat.format("attachment;filename="+filename));



I guess I am encoding the filename in the response filter so when document is opened through checkout operation, I need to decode it.

Please suggest if this is correct and where I can handle it

Thanks

People who like this

  0
Comment
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster

2 answers

  • Sort: 
060000MEXD gravatar image

Answer by Calvin_Zhang (671) | Aug 16, 2018 at 11:59 PM

Hi, May the filename not be encoded by URLEncode works?

Comment

People who like this

  0   Show 6   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
50VR3M0JQ0 gravatar image ICNDeveloper (24)   Aug 17, 2018 at 01:04 AM 0
Share

@Calvin_Zhang no, I get an error that document cannot be downloaded as the filename has some german characters Please suggest

060000MEXD gravatar image Calvin_Zhang (671) ICNDeveloper (24)   Aug 17, 2018 at 02:56 AM 0
Share

I check ICN code and it set as: attachment; filename*=UTF-8''%C3%9Cberpr%C3%BCfung%20Solvency%20II-%20Leitlinien%202018-Unterlagen%20%E2%80%93%20Leitlinie%20Governance%20und%20Interne%20KontrolleKontrolle.txt I use a file named: Überprüfung Solvency II- Leitlinien 2018-Unterlagen – Leitlinie Governance und Interne KontrolleKontrolle.txt

without RE

50VR3M0JQ0 gravatar image ICNDeveloper (24) Calvin_Zhang (671)   Aug 17, 2018 at 03:19 AM 0
Share

@Calvin_Zhang : thanks for the help How can I avoid these encoded characters while the file is opened after checkout. I don't get these encoded characters while I download it.

Please suggest

Show more comments
50VR3M0JQ0 gravatar image

Answer by ICNDeveloper (24) | Sep 13, 2018 at 07:57 AM

@Calvin_Zhang and @Gabriel Garcia

I see the same issue when I send a document via email. Actually the response filter gets called in this scenarios as well. Is it possible to somehow decode the fileName

Thanks

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster

Follow this question

167 people are following this question.

Answers

Answers & comments

Related questions

File Tracker issue in ICN 3.0.4 3 Answers

Daeja Viewone Virtual does not display text/html files as it is displayed in Web Browser instead displays with tags 5 Answers

How to set the ResultSet into existing ContentList from Custom Search 1 Answer

Download a file through ICN Plugin 1 Answer

How to trigger latest entry template while viewing the properties 1 Answer

  • Contact
  • Privacy
  • IBM Developer Terms of use
  • Accessibility
  • Report Abuse
  • Cookie Preferences

Powered by AnswerHub

Authentication check. Please ignore.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • API Connect
  • Analytic Hybrid Cloud Core
  • Application Performance Management
  • Appsecdev
  • BPM
  • Blockchain
  • Business Transaction Intelligence
  • CAPI
  • CAPI SNAP
  • CICS
  • Cloud Analytics
  • Cloud Automation
  • Cloud Object Storage
  • Cloud marketplace
  • Collaboration
  • Content Services (ECM)
  • Continuous Testing
  • Courses
  • Customer Experience Analytics
  • DB2 LUW
  • Data and AI
  • DataPower
  • Decision Optimization
  • DevOps Build
  • DevOps Services
  • Developers IBM MX
  • Digital Commerce
  • Digital Experience
  • Finance
  • Global Entrepreneur Program
  • Hadoop
  • Hybrid Cloud Core
  • Hyper Protect
  • IBM Cloud platform
  • IBM Design
  • IBM Forms Experience Builder
  • IBM Maximo Developer
  • IBM StoredIQ
  • IBM StoredIQ-Cartridges
  • IIDR
  • ITOA
  • InformationServer
  • Integration Bus
  • Internet of Things
  • Kenexa
  • Linux on Power
  • LinuxONE
  • MDM
  • Mainframe
  • Messaging
  • Node.js
  • ODM
  • Open
  • PartnerWorld Developer Support
  • PowerAI
  • PowerVC
  • Predictive Analytics
  • Product Insights
  • PureData for Analytics
  • Push
  • QRadar App Development
  • Run Book Automation
  • Search Insights
  • Security Core
  • Storage
  • Storage Core
  • Streamsdev
  • Supply Chain Business Network
  • Supply Chain Insights
  • Swift
  • UBX Capture
  • Universal Behavior Exchange
  • UrbanCode
  • WASdev
  • WSRR
  • Watson
  • Watson Campaign Automation
  • Watson Content Hub
  • Watson Marketing Insights
  • dW Answers Help
  • dW Premium
  • developerWorks Sandbox
  • developerWorks Team
  • Watson Health
  • More
  • Tags
  • Questions
  • Users
  • Badges