-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Decode field name as utf-8 #8609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decode field name as utf-8 #8609
Conversation
WalkthroughWalkthroughThe recent update in the Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant Client
participant PublicDatasService
participant FileProcessor
Client->>PublicDatasService: Upload file with fieldname
PublicDatasService->>PublicDatasService: Encode fieldname using Buffer.from
PublicDatasService->>PublicDatasService: Apply regex replacement on encoded fieldname
PublicDatasService->>FileProcessor: Process file with updated fieldname
FileProcessor-->>PublicDatasService: Return processing result
PublicDatasService-->>Client: Return response
Tip Early Access Features
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (4)
packages/nocodb/src/services/public-datas.service.ts (4)
Line range hint
1-1
: Use thenode:
protocol for importing Node.js built-in modules.- import path from 'path'; + import path from 'node:path';
Line range hint
29-29
: Consider replacingany
with more specific types to improve type safety.Also applies to: 67-67, 97-97, 131-131, 145-145, 176-176, 195-195, 216-216, 228-228, 253-253, 254-254, 290-290, 292-292, 339-339, 426-426, 473-473, 483-483
Line range hint
284-292
: Avoid assignments within expressions to enhance code clarity and maintainability.- data = data = await nocoExecute( + data = await nocoExecute(
Line range hint
521-521
: Avoid using template literals when not necessary.- const key = `List`; + const key = 'List';
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- packages/nocodb/src/services/public-datas.service.ts (1 hunks)
Additional Context Used
Biome (20)
packages/nocodb/src/services/public-datas.service.ts (20)
1-1: A Node.js builtin module should be imported with the node: protocol.
29-29: Unexpected any. Specify a different type.
67-67: Unexpected any. Specify a different type.
97-97: Unexpected any. Specify a different type.
131-131: Unexpected any. Specify a different type.
145-145: Unexpected any. Specify a different type.
176-176: Unexpected any. Specify a different type.
195-195: Unexpected any. Specify a different type.
216-216: Unexpected any. Specify a different type.
228-228: Unexpected any. Specify a different type.
253-253: Unexpected any. Specify a different type.
254-254: Unexpected any. Specify a different type.
284-292: The assignment should not be in an expression.
290-290: Unexpected any. Specify a different type.
292-292: Unexpected any. Specify a different type.
339-339: This variable implicitly has the any type.
426-426: Unexpected any. Specify a different type.
473-473: Unexpected any. Specify a different type.
483-483: Unexpected any. Specify a different type.
521-521: Do not use template literals if interpolation and special-character handling are not needed.
Additional comments not posted (1)
packages/nocodb/src/services/public-datas.service.ts (1)
310-312
: Properly decode field names using UTF-8.This change correctly implements the UTF-8 decoding for field names as described in the PR. It should ensure that non-English characters are handled properly.
Change Summary
The field names in file attachments were being decoded incorrectly. Added proper
UTF-8
decoding to ensure non-english field names are handled properly.Change type
Additional information / screenshots
recording-29_05_2024.webm